Record Class AmmunitionTableMenu.AmmunitionTableMenuPacketHandler
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.menu.AmmunitionTableMenu.AmmunitionTableMenuPacketHandler
- Enclosing class:
- AmmunitionTableMenu
public static record AmmunitionTableMenu.AmmunitionTableMenuPacketHandler(int containerId, float densityModifier)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAmmunitionTableMenuPacketHandler(int containerId, float densityModifier) Creates an instance of aAmmunitionTableMenuPacketHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontainerIdrecord component.decode(net.minecraft.network.FriendlyByteBuf packetBuffer) floatReturns the value of thedensityModifierrecord component.static voidencode(AmmunitionTableMenu.AmmunitionTableMenuPacketHandler msg, net.minecraft.network.FriendlyByteBuf packetBuffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(AmmunitionTableMenu.AmmunitionTableMenuPacketHandler 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
-
AmmunitionTableMenuPacketHandler
public AmmunitionTableMenuPacketHandler(int containerId, float densityModifier) Creates an instance of aAmmunitionTableMenuPacketHandlerrecord class.- Parameters:
containerId- the value for thecontainerIdrecord componentdensityModifier- the value for thedensityModifierrecord component
-
-
Method Details
-
decode
public static AmmunitionTableMenu.AmmunitionTableMenuPacketHandler decode(net.minecraft.network.FriendlyByteBuf packetBuffer) -
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 '=='. -
containerId
public int containerId()Returns the value of thecontainerIdrecord component.- Returns:
- the value of the
containerIdrecord component
-
densityModifier
public float densityModifier()Returns the value of thedensityModifierrecord component.- Returns:
- the value of the
densityModifierrecord component