Record Class SimpleRadioModels.ModelOverride
java.lang.Object
java.lang.Record
com.codinglitch.simpleradio.client.core.registry.SimpleRadioModels.ModelOverride
- Enclosing class:
- SimpleRadioModels
-
Constructor Summary
ConstructorsConstructorDescriptionModelOverride(List<net.minecraft.world.item.ItemDisplayContext> contexts, net.minecraft.client.resources.model.ModelResourceLocation location, net.minecraft.world.item.Item item) Creates an instance of aModelOverriderecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.item.ItemDisplayContext>contexts()Returns the value of thecontextsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.Itemitem()Returns the value of theitemrecord component.net.minecraft.client.resources.model.ModelResourceLocationlocation()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelOverride
public ModelOverride(List<net.minecraft.world.item.ItemDisplayContext> contexts, net.minecraft.client.resources.model.ModelResourceLocation location, net.minecraft.world.item.Item item) Creates an instance of aModelOverriderecord class.- Parameters:
contexts- the value for thecontextsrecord componentlocation- the value for thelocationrecord componentitem- the value for theitemrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
contexts
Returns the value of thecontextsrecord component.- Returns:
- the value of the
contextsrecord component
-
location
public net.minecraft.client.resources.model.ModelResourceLocation location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
item
public net.minecraft.world.item.Item item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-