Record Class EnvironmentEffects.EnvironmentEffectsPacketHandler
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.event.game_effects.EnvironmentEffects.EnvironmentEffectsPacketHandler
- Enclosing class:
- EnvironmentEffects
public static record EnvironmentEffects.EnvironmentEffectsPacketHandler(float celestialProtectionChanceForNoDamage)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentEffectsPacketHandler(float celestialProtectionChanceForNoDamage) Creates an instance of aEnvironmentEffectsPacketHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecelestialProtectionChanceForNoDamagerecord component.decode(net.minecraft.network.FriendlyByteBuf packetBuffer) static voidencode(EnvironmentEffects.EnvironmentEffectsPacketHandler msg, net.minecraft.network.FriendlyByteBuf packetBuffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(EnvironmentEffects.EnvironmentEffectsPacketHandler msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnvironmentEffectsPacketHandler
public EnvironmentEffectsPacketHandler(float celestialProtectionChanceForNoDamage) Creates an instance of aEnvironmentEffectsPacketHandlerrecord class.- Parameters:
celestialProtectionChanceForNoDamage- the value for thecelestialProtectionChanceForNoDamagerecord component
-
-
Method Details
-
encode
public static void encode(EnvironmentEffects.EnvironmentEffectsPacketHandler msg, net.minecraft.network.FriendlyByteBuf packetBuffer) -
decode
public static EnvironmentEffects.EnvironmentEffectsPacketHandler decode(net.minecraft.network.FriendlyByteBuf packetBuffer) -
handle
public static void handle(EnvironmentEffects.EnvironmentEffectsPacketHandler msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared with '=='. -
celestialProtectionChanceForNoDamage
public float celestialProtectionChanceForNoDamage()Returns the value of thecelestialProtectionChanceForNoDamagerecord component.- Returns:
- the value of the
celestialProtectionChanceForNoDamagerecord component
-