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

@ReturnsSelf public abstract class HandheldItemBuilder extends ItemBuilder
  • Field Details

    • toolTier

      public transient MutableToolTier 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

      public HandheldItemBuilder tier(net.minecraft.world.item.Tier t)
    • 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

      @Info("Sets the attack speed of the tool.") public HandheldItemBuilder speed(float f)