Package dev.latvian.mods.kubejs.item
Record Class ItemModificationKubeEvent.ItemModifications
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.item.ItemModificationKubeEvent.ItemModifications
- All Implemented Interfaces:
AttributeModifierFunctions,ComponentFunctions,ItemComponentFunctions
- Enclosing class:
ItemModificationKubeEvent
@RemapPrefixForJS("kjs$")
public static record ItemModificationKubeEvent.ItemModifications(net.minecraft.world.item.Item item)
extends Record
implements ItemComponentFunctions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap<net.minecraft.world.item.Item> -
Constructor Summary
ConstructorsConstructorDescriptionItemModifications(net.minecraft.world.item.Item item) Creates an instance of aItemModificationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal 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.core.component.DataComponentMapkjs$override(net.minecraft.core.component.DataComponentType<T> type, T value) voidvoidsetCraftingRemainder(net.minecraft.world.item.Item item) voidsetNameKey(String key) voidsetTier(Consumer<MutableToolTier> builder) 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.component.AttributeModifierFunctions
kjs$addAttributeModifier, kjs$getAttackDamage, kjs$getAttackSpeed, kjs$getAttributeModifier, kjs$getBaseAttackDamage, kjs$getBaseAttackSpeed, kjs$hasAttributeModifier, kjs$setAttackDamage, kjs$setAttackSpeed, kjs$setAttributeModifiers, kjs$setAttributeModifiersWithTooltip, kjs$setBaseAttackDamage, kjs$setBaseAttackSpeedMethods inherited from interface dev.latvian.mods.kubejs.component.ComponentFunctions
kjs$get, kjs$getComponentString, kjs$getCustomData, kjs$getCustomName, kjs$patch, kjs$remove, kjs$resetComponents, kjs$set, kjs$set, kjs$setAdditionalTooltipHidden, kjs$setBaseColor, kjs$setBlockStateProperties, kjs$setContainerLootTable, kjs$setContainerLootTable, kjs$setCustomData, kjs$setCustomModelData, kjs$setCustomName, kjs$setDyedColor, kjs$setDyedColorWithTooltip, kjs$setEntityData, kjs$setGlintOverride, kjs$setLockCode, kjs$setLore, kjs$setLore, kjs$setPotionContents, kjs$setPotionId, kjs$setProfile, kjs$setProfile, kjs$setRarity, kjs$setTooltipHidden, kjs$setUnitMethods inherited from interface dev.latvian.mods.kubejs.component.ItemComponentFunctions
kjs$getAttributeModifiers, kjs$modifyFood, kjs$setAttributeModifiers, kjs$setBlockEntityData, kjs$setBucketEntityData, kjs$setBundleContents, kjs$setChargedProjectiles, kjs$setDamage, kjs$setFireResistant, kjs$setFireworkExplosion, kjs$setFireworks, kjs$setFood, kjs$setFood, kjs$setInstrument, kjs$setItemName, kjs$setMapItemColor, kjs$setMaxDamage, kjs$setMaxStackSize, kjs$setNoteBlockSound, kjs$setRepairCost, kjs$setTool, kjs$setUnbreakable, kjs$setUnbreakableWithTooltip
-
Field Details
-
BURN_TIME_OVERRIDES
@HideFromJS public static final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap<net.minecraft.world.item.Item> BURN_TIME_OVERRIDES
-
-
Constructor Details
-
ItemModifications
public ItemModifications(net.minecraft.world.item.Item item) Creates an instance of aItemModificationsrecord class.- Parameters:
item- the value for theitemrecord component
-
-
Method Details
-
kjs$getComponentMap
public net.minecraft.core.component.DataComponentMap kjs$getComponentMap()- Specified by:
kjs$getComponentMapin interfaceComponentFunctions
-
kjs$override
@HideFromJS public <T> ItemComponentFunctions kjs$override(net.minecraft.core.component.DataComponentType<T> type, @Nullable T value) - Specified by:
kjs$overridein interfaceComponentFunctions
-
setBurnTime
-
setCraftingRemainder
public void setCraftingRemainder(net.minecraft.world.item.Item item) -
setTier
-
setNameKey
-
disableRepair
public void disableRepair() -
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). -
item
public net.minecraft.world.item.Item item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-