Record Class ItemToolTierRegistryKubeEvent
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.item.custom.ItemToolTierRegistryKubeEvent
- All Implemented Interfaces:
KubeEvent,KubeStartupEvent
@Info("Invoked when the game is starting up and the item tool tiers are being registered.\n")
public record ItemToolTierRegistryKubeEvent(Map<String,net.minecraft.world.item.Tier> tiers)
extends Record
implements KubeStartupEvent
-
Field Summary
Fields inherited from interface dev.latvian.mods.kubejs.event.KubeStartupEvent
BASIC -
Constructor Summary
ConstructorsConstructorDescriptionItemToolTierRegistryKubeEvent(Map<String, net.minecraft.world.item.Tier> tiers) Creates an instance of aItemToolTierRegistryKubeEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String id, Consumer<MutableToolTier> tier) voidaddBasedOnExisting(String id, String existing, Consumer<MutableToolTier> tier) voidaddExisting(String id, net.minecraft.world.item.Tier tier) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.tiers()Returns the value of thetiersrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, defaultExitValue, exit, exit, getExitValueType, mapExitValue, success, success
-
Constructor Details
-
ItemToolTierRegistryKubeEvent
Creates an instance of aItemToolTierRegistryKubeEventrecord class.- Parameters:
tiers- the value for thetiersrecord component
-
-
Method Details
-
add
-
addBasedOnExisting
-
addExisting
-
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). -
tiers
Returns the value of thetiersrecord component.- Returns:
- the value of the
tiersrecord component
-