Record Class ScreenEffectPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.sync.ScreenEffectPacket
- All Implemented Interfaces:
AbstractPacket<ScreenEffectPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType)
extends Record
implements AbstractPacket<ScreenEffectPacket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType) Creates an instance of aScreenEffectPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ScreenEffectPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ScreenEffectPacket> getType()voidhandleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.intReturns the value of theholdTicksrecord component.intReturns the value of theintroTicksrecord component.lerpType()Returns the value of thelerpTyperecord component.name()Returns the value of thenamerecord component.intReturns the value of theoutroTicksrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AbstractPacket
handleServer, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
DEFINITION
-
-
Constructor Details
-
ScreenEffectPacket
public ScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType) Creates an instance of aScreenEffectPacketrecord class.- Parameters:
name- the value for thenamerecord componentintroTicks- the value for theintroTicksrecord componentholdTicks- the value for theholdTicksrecord componentoutroTicks- the value for theoutroTicksrecord componentlerpType- the value for thelerpTyperecord component
-
-
Method Details
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ScreenEffectPacket> getType()- Specified by:
getTypein interfaceAbstractPacket<ScreenEffectPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<ScreenEffectPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ScreenEffectPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<ScreenEffectPacket>
-
handleClient
public void handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleClientin interfaceAbstractPacket<ScreenEffectPacket>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
introTicks
public int introTicks()Returns the value of theintroTicksrecord component.- Returns:
- the value of the
introTicksrecord component
-
holdTicks
public int holdTicks()Returns the value of theholdTicksrecord component.- Returns:
- the value of the
holdTicksrecord component
-
outroTicks
public int outroTicks()Returns the value of theoutroTicksrecord component.- Returns:
- the value of the
outroTicksrecord component
-
lerpType
Returns the value of thelerpTyperecord component.- Returns:
- the value of the
lerpTyperecord component
-