Record Class BoatData
java.lang.Object
java.lang.Record
net.dillon.dillonlib.factory.data.BoatData
- Record Components:
entityType- the actual registered and stored boat entity typeid- the id for the boat entity (including the mod's namespace and entity id)chest- determines if the boat entity should be a chest boat
public record BoatData(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.boat.AbstractBoat> entityType, net.minecraft.resources.Identifier id, boolean chest)
extends Record
Holds boat registration data.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionBoatData(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.boat.AbstractBoat> entityType, net.minecraft.resources.Identifier id, boolean chest) Creates an instance of aBoatDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanchest()Returns the value of thechestrecord component.net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.boat.AbstractBoat> Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BoatData
public BoatData(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.boat.AbstractBoat> entityType, net.minecraft.resources.Identifier id, boolean chest) Creates an instance of aBoatDatarecord class.- Parameters:
entityType- the value for theentityTyperecord componentid- the value for theidrecord componentchest- the value for thechestrecord component
-
-
Method Details
-
toString
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
entityType
public net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.boat.AbstractBoat> entityType()Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
id
-
chest
-