Record Class MultiblockDefinition
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.multiblocks.MultiblockDefinition
-
Constructor Summary
ConstructorsConstructorDescriptionMultiblockDefinition(Map<Integer, it.unimi.dsi.fastutil.Pair<Predicate<net.minecraft.world.level.block.state.BlockState>, net.minecraft.world.level.block.Block>> def) Creates an instance of aMultiblockDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<Integer, it.unimi.dsi.fastutil.Pair<Predicate<net.minecraft.world.level.block.state.BlockState>, net.minecraft.world.level.block.Block>> def()Returns the value of thedefrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.block.BlockgetDefaultBlock(int key) Predicate<net.minecraft.world.level.block.state.BlockState> getPredicate(int key) final inthashCode()Returns a hash code value for this object.voidput(int key, Predicate<net.minecraft.world.level.block.state.BlockState> predicate, net.minecraft.world.level.block.Block defaultValue) voidput(int key, net.minecraft.world.level.block.Block defaultValue) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MultiblockDefinition
public MultiblockDefinition() -
MultiblockDefinition
public MultiblockDefinition(Map<Integer, it.unimi.dsi.fastutil.Pair<Predicate<net.minecraft.world.level.block.state.BlockState>, net.minecraft.world.level.block.Block>> def) Creates an instance of aMultiblockDefinitionrecord class.- Parameters:
def- the value for thedefrecord component
-
-
Method Details
-
put
public void put(int key, Predicate<net.minecraft.world.level.block.state.BlockState> predicate, net.minecraft.world.level.block.Block defaultValue) -
put
public void put(int key, net.minecraft.world.level.block.Block defaultValue) -
getPredicate
-
getDefaultBlock
public net.minecraft.world.level.block.Block getDefaultBlock(int key) -
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 withObjects::equals(Object,Object). -
def
public Map<Integer,it.unimi.dsi.fastutil.Pair<Predicate<net.minecraft.world.level.block.state.BlockState>, def()net.minecraft.world.level.block.Block>> Returns the value of thedefrecord component.- Returns:
- the value of the
defrecord component
-