Class FartPacket

java.lang.Object
org.cyclops.cyclopscore.network.PacketBase
org.cyclops.cyclopscore.network.PacketCodec
org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
org.cyclops.evilcraft.network.packet.FartPacket

public class FartPacket extends org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
Instances of this class are sent between client and server to notify both about a farts which are spawned.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.cyclops.cyclopscore.network.PacketCodec

    org.cyclops.cyclopscore.network.PacketCodec.ICodecAction, org.cyclops.cyclopscore.network.PacketCodec.ICodecRunnable
  • Field Summary

    Fields inherited from class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket

    position, uuid

    Fields inherited from class org.cyclops.cyclopscore.network.PacketCodec

    fieldCache, READ_STRING_MAX_LENGTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a packet with no content
    FartPacket(net.minecraft.world.entity.player.Player player)
    Creates a FartPacket which contains the player data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    actionClient(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
     
    void
    actionServer(net.minecraft.world.level.Level world, net.minecraft.server.level.ServerPlayer player)
     
    protected org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
    create(net.minecraft.world.entity.player.Player player, int range)
     
    protected org.cyclops.cyclopscore.init.ModBase
     
    boolean
    hasRainbowFart(net.minecraft.world.entity.player.Player player)
    Check if the given player should have rainbow farts.
    protected void
    performClientAction(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket

    isAsync

    Methods inherited from class org.cyclops.cyclopscore.network.PacketCodec

    addCodedAction, decode, encode, getAction, getActionSuper, read, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FartPacket

      public FartPacket()
      Creates a packet with no content
    • FartPacket

      public FartPacket(net.minecraft.world.entity.player.Player player)
      Creates a FartPacket which contains the player data.
      Parameters:
      player - The player data.
  • Method Details

    • actionClient

      public void actionClient(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
      Overrides:
      actionClient in class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
    • performClientAction

      protected void performClientAction(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
      Specified by:
      performClientAction in class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
    • hasRainbowFart

      public boolean hasRainbowFart(net.minecraft.world.entity.player.Player player)
      Check if the given player should have rainbow farts.
      Parameters:
      player - The player to check.
      Returns:
      If that player has rainbow farts.
    • actionServer

      public void actionServer(net.minecraft.world.level.Level world, net.minecraft.server.level.ServerPlayer player)
      Overrides:
      actionServer in class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
    • create

      protected org.cyclops.cyclopscore.network.packet.PlayerPositionPacket create(net.minecraft.world.entity.player.Player player, int range)
      Specified by:
      create in class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
    • getModInstance

      protected org.cyclops.cyclopscore.init.ModBase getModInstance()
      Specified by:
      getModInstance in class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket