Record Class RecipeBookSettings.TypeSettings
java.lang.Object
java.lang.Record
net.minecraft.stats.RecipeBookSettings.TypeSettings
- Enclosing class:
RecipeBookSettings
public static record RecipeBookSettings.TypeSettings(boolean open, boolean filtering)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> static final RecipeBookSettings.TypeSettingsprivate final booleanThe field for thefilteringrecord component.static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> private final booleanThe field for theopenrecord component.static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> static final StreamCodec<io.netty.buffer.ByteBuf, RecipeBookSettings.TypeSettings> -
Constructor Summary
ConstructorsConstructorDescriptionTypeSettings(boolean open, boolean filtering) Creates an instance of aTypeSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefilteringrecord component.final inthashCode()Returns a hash code value for this object.booleanopen()Returns the value of theopenrecord component.setFiltering(boolean filtering) setOpen(boolean open) toString()Returns a string representation of this record class.
-
Field Details
-
open
private final boolean openThe field for theopenrecord component. -
filtering
private final boolean filteringThe field for thefilteringrecord component. -
DEFAULT
-
CRAFTING_MAP_CODEC
public static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> CRAFTING_MAP_CODEC -
FURNACE_MAP_CODEC
public static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> FURNACE_MAP_CODEC -
BLAST_FURNACE_MAP_CODEC
public static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> BLAST_FURNACE_MAP_CODEC -
SMOKER_MAP_CODEC
public static final com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> SMOKER_MAP_CODEC -
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf, RecipeBookSettings.TypeSettings> STREAM_CODEC
-
-
Constructor Details
-
TypeSettings
public TypeSettings(boolean open, boolean filtering) Creates an instance of aTypeSettingsrecord class.- Parameters:
open- the value for theopenrecord componentfiltering- the value for thefilteringrecord component
-
-
Method Details
-
toString
-
setOpen
-
setFiltering
-
codec
public static com.mojang.serialization.MapCodec<RecipeBookSettings.TypeSettings> codec(String openFieldName, String filteringFieldName) -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
open
public boolean open()Returns the value of theopenrecord component.- Returns:
- the value of the
openrecord component
-
filtering
public boolean filtering()Returns the value of thefilteringrecord component.- Returns:
- the value of the
filteringrecord component
-