Class HandheldItemBuilder
java.lang.Object
dev.latvian.mods.kubejs.registry.BuilderBase<net.minecraft.world.item.Item>
dev.latvian.mods.kubejs.registry.ModelledBuilderBase<net.minecraft.world.item.Item>
dev.latvian.mods.kubejs.item.ItemBuilder
dev.latvian.mods.kubejs.item.custom.HandheldItemBuilder
- All Implemented Interfaces:
Supplier<net.minecraft.world.item.Item>
- Direct Known Subclasses:
DiggerItemBuilder,SwordItemBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.latvian.mods.kubejs.item.ItemBuilder
ItemBuilder.FinishUsingCallback, ItemBuilder.HurtEnemyContext, ItemBuilder.NameCallback, ItemBuilder.ReleaseUsingCallback, ItemBuilder.UseCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatFields inherited from class dev.latvian.mods.kubejs.item.ItemBuilder
anim, barColor, barWidth, burnTime, canRepair, components, finishUsing, fireResistant, foodBuilder, glow, hurtEnemy, itemAttributeModifiers, jukeboxPlayable, maxDamage, maxStackSize, nameGetter, rarity, releaseUsing, subtypes, tint, tool, tooltip, use, useDurationFields inherited from class dev.latvian.mods.kubejs.registry.ModelledBuilderBase
baseTexture, modelGenerator, parentModel, texturesFields inherited from class dev.latvian.mods.kubejs.registry.BuilderBase
defaultTags, displayName, dummyBuilder, formattedDisplayName, id, object, registryKey, sourceLine, translationKey -
Constructor Summary
ConstructorsConstructorDescriptionHandheldItemBuilder(net.minecraft.resources.ResourceLocation i, float d, float s) -
Method Summary
Modifier and TypeMethodDescriptionattackDamageBaseline(float f) attackDamageBonus(float f) modifyTier(Consumer<MutableToolTier> callback) speed(float f) speedBaseline(float f) tier(net.minecraft.world.item.Tier t) Methods inherited from class dev.latvian.mods.kubejs.item.ItemBuilder
barColor, barWidth, burnTime, color, color, component, containerItem, createItemProperties, createObject, disableRepair, finishUsing, fireResistant, fireResistant, food, food, generateAssets, generateItemModels, glow, group, hurtEnemy, jukeboxPlayable, jukeboxPlayable, maxDamage, maxStackSize, name, rarity, releaseUsing, subtypes, tooltip, transformObject, unstackable, use, useAnimation, useDurationMethods inherited from class dev.latvian.mods.kubejs.registry.ModelledBuilderBase
modelGenerator, parentModel, texture, texture, texturesMethods inherited from class dev.latvian.mods.kubejs.registry.BuilderBase
createAdditionalObjects, createTransformedObject, displayName, formattedDisplayName, formattedDisplayName, generateData, generateLang, get, getBuilderTranslationKey, getTranslationKeyGroup, newID, tag, toString, translationKey
-
Field Details
-
toolTier
-
attackDamageBaseline
public transient float attackDamageBaseline -
speedBaseline
public transient float speedBaseline
-
-
Constructor Details
-
HandheldItemBuilder
public HandheldItemBuilder(net.minecraft.resources.ResourceLocation i, float d, float s)
-
-
Method Details
-
tier
-
attackDamageBaseline
@Info("Sets the base attack damage of the tool. Different tools have different baselines.\n\nFor example, a sword has a baseline of 3, while an axe has a baseline of 6.\n\nThe actual damage is the sum of the baseline and the attackDamageBonus from tier.\n") public HandheldItemBuilder attackDamageBaseline(float f) -
speedBaseline
@Info("Sets the base attack speed of the tool. Different tools have different baselines.\n\nFor example, a sword has a baseline of -2.4, while an axe has a baseline of -3.1.\n\nThe actual speed is the sum of the baseline and the speed from tier + 4 (bare hand).\n") public HandheldItemBuilder speedBaseline(float f) -
modifyTier
@Info("Modifies the tool tier.") public HandheldItemBuilder modifyTier(Consumer<MutableToolTier> callback) -
attackDamageBonus
@Info("Sets the attack damage bonus of the tool.") public HandheldItemBuilder attackDamageBonus(float f) -
speed
-