Record Class UnlockRecipesPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.UnlockRecipesPacket
- All Implemented Interfaces:
NetworkBuffer.Writer,SendablePacket,ServerPacket
public record UnlockRecipesPacket(int mode, boolean craftingRecipeBookOpen, boolean craftingRecipeBookFilterActive, boolean smeltingRecipeBookOpen, boolean smeltingRecipeBookFilterActive, boolean blastFurnaceRecipeBookOpen, boolean blastFurnaceRecipeBookFilterActive, boolean smokerRecipeBookOpen, boolean smokerRecipeBookFilterActive, @NotNull List<String> recipeIds, @UnknownNullability List<String> initRecipeIds)
extends Record
implements ServerPacket
-
Constructor Summary
ConstructorsConstructorDescriptionUnlockRecipesPacket(int mode, boolean craftingRecipeBookOpen, boolean craftingRecipeBookFilterActive, boolean smeltingRecipeBookOpen, boolean smeltingRecipeBookFilterActive, boolean blastFurnaceRecipeBookOpen, boolean blastFurnaceRecipeBookFilterActive, boolean smokerRecipeBookOpen, boolean smokerRecipeBookFilterActive, @NotNull List<String> recipeIds, @UnknownNullability List<String> initRecipeIds) Creates an instance of aUnlockRecipesPacketrecord class.UnlockRecipesPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theblastFurnaceRecipeBookFilterActiverecord component.booleanReturns the value of theblastFurnaceRecipeBookOpenrecord component.booleanReturns the value of thecraftingRecipeBookFilterActiverecord component.booleanReturns the value of thecraftingRecipeBookOpenrecord component.final booleanIndicates whether some other object is "equal to" this one.intgetId(@NotNull ConnectionState state) Gets the id of this packet.final inthashCode()Returns a hash code value for this object.Returns the value of theinitRecipeIdsrecord component.intmode()Returns the value of themoderecord component.Returns the value of therecipeIdsrecord component.booleanReturns the value of thesmeltingRecipeBookFilterActiverecord component.booleanReturns the value of thesmeltingRecipeBookOpenrecord component.booleanReturns the value of thesmokerRecipeBookFilterActiverecord component.booleanReturns the value of thesmokerRecipeBookOpenrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
UnlockRecipesPacket
public UnlockRecipesPacket(int mode, boolean craftingRecipeBookOpen, boolean craftingRecipeBookFilterActive, boolean smeltingRecipeBookOpen, boolean smeltingRecipeBookFilterActive, boolean blastFurnaceRecipeBookOpen, boolean blastFurnaceRecipeBookFilterActive, boolean smokerRecipeBookOpen, boolean smokerRecipeBookFilterActive, @NotNull @NotNull List<String> recipeIds, @UnknownNullability List<String> initRecipeIds) Creates an instance of aUnlockRecipesPacketrecord class.- Parameters:
mode- the value for themoderecord componentcraftingRecipeBookOpen- the value for thecraftingRecipeBookOpenrecord componentcraftingRecipeBookFilterActive- the value for thecraftingRecipeBookFilterActiverecord componentsmeltingRecipeBookOpen- the value for thesmeltingRecipeBookOpenrecord componentsmeltingRecipeBookFilterActive- the value for thesmeltingRecipeBookFilterActiverecord componentblastFurnaceRecipeBookOpen- the value for theblastFurnaceRecipeBookOpenrecord componentblastFurnaceRecipeBookFilterActive- the value for theblastFurnaceRecipeBookFilterActiverecord componentsmokerRecipeBookOpen- the value for thesmokerRecipeBookOpenrecord componentsmokerRecipeBookFilterActive- the value for thesmokerRecipeBookFilterActiverecord componentrecipeIds- the value for therecipeIdsrecord componentinitRecipeIds- the value for theinitRecipeIdsrecord component
-
UnlockRecipesPacket
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
getId
Description copied from interface:ServerPacketGets the id of this packet.Written in the final buffer header so it needs to match the client id.
- Specified by:
getIdin interfaceServerPacket- Returns:
- the id of this packet
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mode
public int mode()Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
craftingRecipeBookOpen
public boolean craftingRecipeBookOpen()Returns the value of thecraftingRecipeBookOpenrecord component.- Returns:
- the value of the
craftingRecipeBookOpenrecord component
-
craftingRecipeBookFilterActive
public boolean craftingRecipeBookFilterActive()Returns the value of thecraftingRecipeBookFilterActiverecord component.- Returns:
- the value of the
craftingRecipeBookFilterActiverecord component
-
smeltingRecipeBookOpen
public boolean smeltingRecipeBookOpen()Returns the value of thesmeltingRecipeBookOpenrecord component.- Returns:
- the value of the
smeltingRecipeBookOpenrecord component
-
smeltingRecipeBookFilterActive
public boolean smeltingRecipeBookFilterActive()Returns the value of thesmeltingRecipeBookFilterActiverecord component.- Returns:
- the value of the
smeltingRecipeBookFilterActiverecord component
-
blastFurnaceRecipeBookOpen
public boolean blastFurnaceRecipeBookOpen()Returns the value of theblastFurnaceRecipeBookOpenrecord component.- Returns:
- the value of the
blastFurnaceRecipeBookOpenrecord component
-
blastFurnaceRecipeBookFilterActive
public boolean blastFurnaceRecipeBookFilterActive()Returns the value of theblastFurnaceRecipeBookFilterActiverecord component.- Returns:
- the value of the
blastFurnaceRecipeBookFilterActiverecord component
-
smokerRecipeBookOpen
public boolean smokerRecipeBookOpen()Returns the value of thesmokerRecipeBookOpenrecord component.- Returns:
- the value of the
smokerRecipeBookOpenrecord component
-
smokerRecipeBookFilterActive
public boolean smokerRecipeBookFilterActive()Returns the value of thesmokerRecipeBookFilterActiverecord component.- Returns:
- the value of the
smokerRecipeBookFilterActiverecord component
-
recipeIds
Returns the value of therecipeIdsrecord component.- Returns:
- the value of the
recipeIdsrecord component
-
initRecipeIds
Returns the value of theinitRecipeIdsrecord component.- Returns:
- the value of the
initRecipeIdsrecord component
-