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, uuidFields inherited from class org.cyclops.cyclopscore.network.PacketCodec
fieldCache, READ_STRING_MAX_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionCreates a packet with no contentFartPacket(net.minecraft.world.entity.player.Player player) Creates a FartPacket which contains the player data. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionClient(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player) voidactionServer(net.minecraft.world.level.Level world, net.minecraft.server.level.ServerPlayer player) protected org.cyclops.cyclopscore.network.packet.PlayerPositionPacketcreate(net.minecraft.world.entity.player.Player player, int range) protected org.cyclops.cyclopscore.init.ModBasebooleanhasRainbowFart(net.minecraft.world.entity.player.Player player) Check if the given player should have rainbow farts.protected voidperformClientAction(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player) Methods inherited from class org.cyclops.cyclopscore.network.packet.PlayerPositionPacket
isAsyncMethods inherited from class org.cyclops.cyclopscore.network.PacketCodec
addCodedAction, decode, encode, getAction, getActionSuper, read, write
-
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:
actionClientin classorg.cyclops.cyclopscore.network.packet.PlayerPositionPacket
-
performClientAction
protected void performClientAction(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player) - Specified by:
performClientActionin classorg.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:
actionServerin classorg.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:
createin classorg.cyclops.cyclopscore.network.packet.PlayerPositionPacket
-
getModInstance
protected org.cyclops.cyclopscore.init.ModBase getModInstance()- Specified by:
getModInstancein classorg.cyclops.cyclopscore.network.packet.PlayerPositionPacket
-