Record Class WoodType
java.lang.Object
java.lang.Record
io.github.vampirestudios.vampirelib.utils.WoodType
public record WoodType(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log, boolean nether)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionWoodType(String name, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log) WoodType(String name, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log, boolean nether) WoodType(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log) WoodType(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log, boolean nether) Creates an instance of aWoodTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.block.Blockleaves()Returns the value of theleavesrecord component.net.minecraft.world.level.block.Blocklog()Returns the value of thelogrecord component.booleannether()Returns the value of thenetherrecord component.net.minecraft.resources.ResourceLocationReturns the value of theresourceLocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WoodType
public WoodType(String name, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log, boolean nether) -
WoodType
public WoodType(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log) -
WoodType
public WoodType(String name, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log) -
WoodType
public WoodType(net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.level.block.Block leaves, net.minecraft.world.level.block.Block log, boolean nether) Creates an instance of aWoodTyperecord class.- Parameters:
resourceLocation- the value for theresourceLocationrecord componentleaves- the value for theleavesrecord componentlog- the value for thelogrecord componentnether- the value for thenetherrecord component
-
-
Method Details
-
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 '=='. -
resourceLocation
public net.minecraft.resources.ResourceLocation resourceLocation()Returns the value of theresourceLocationrecord component.- Returns:
- the value of the
resourceLocationrecord component
-
leaves
public net.minecraft.world.level.block.Block leaves()Returns the value of theleavesrecord component.- Returns:
- the value of the
leavesrecord component
-
log
public net.minecraft.world.level.block.Block log()Returns the value of thelogrecord component.- Returns:
- the value of the
logrecord component
-
nether
public boolean nether()Returns the value of thenetherrecord component.- Returns:
- the value of the
netherrecord component
-