From 0ebbd811fd511e83fa50eea36f62df38b1e267c8 Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:59:03 -0500 Subject: [PATCH] Fixed drill attributes going haywire. Bumped for release. --- gradle.properties | 2 +- .../mod/items/DrillItem.java | 20 +++++++++++-------- update/changelog.md | 7 +++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index f787f2534..557708433 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false # Actually Additions -mod_version=1.2.13 +mod_version=1.2.14 # Forge game_version=1.20.4 diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java index 83aaa50d6..ed1e2a0ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java @@ -62,8 +62,15 @@ public class DrillItem extends ItemEnergy { private static final int ENERGY_USE = 100; private static final List ACTIONS = List.of(ToolActions.SHOVEL_DIG, ToolActions.PICKAXE_DIG); + private final Multimap attributes_unpowered = ArrayListMultimap.create(); + private final Multimap attributes_powered = ArrayListMultimap.create(); + public DrillItem() { super(ActuallyItems.defaultProps().defaultDurability(0).stacksTo(1), 250000, 1000); + attributes_powered.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Drill Modifier", 8.0F, AttributeModifier.Operation.ADDITION)); + attributes_powered.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID,"Tool Modifier", 1.5F, AttributeModifier.Operation.ADDITION)); + attributes_unpowered.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Drill Modifier", 0.1F, AttributeModifier.Operation.ADDITION)); + attributes_unpowered.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID,"Tool Modifier", 1.5F, AttributeModifier.Operation.ADDITION)); } @Override @@ -180,16 +187,13 @@ public class DrillItem extends ItemEnergy { @Nonnull @Override public Multimap getAttributeModifiers(@Nonnull EquipmentSlot slot, @Nonnull ItemStack stack) { - Multimap map = ArrayListMultimap.create(); - if (slot == EquipmentSlot.MAINHAND) { - map.put(Attributes.ATTACK_DAMAGE, new AttributeModifier("Drill Modifier", this.getEnergyStored(stack) >= ENERGY_USE - ? 8.0F - : 0.1F, AttributeModifier.Operation.ADDITION)); - map.put(Attributes.ATTACK_SPEED, new AttributeModifier("Tool Modifier", 1.5F, AttributeModifier.Operation.ADDITION)); + return this.getEnergyStored(stack) >= ENERGY_USE + ? this.attributes_powered + : this.attributes_unpowered; } - - return map; + else + return super.getDefaultAttributeModifiers(slot); } diff --git a/update/changelog.md b/update/changelog.md index d49df4fd8..c484665cc 100644 --- a/update/changelog.md +++ b/update/changelog.md @@ -1,3 +1,10 @@ +# 1.2.14+mc1.20.4 +* Fixed Drill attributes going haywire. +* Fixed missing Crushing recipes for copper / some others. +* Fixed Hopping item interfaces not rendering properly next to blocks. +* Fixed a broken coffee maker tooltip +* Fixed broken lava factory tooltip. + # 1.2.13+mc1.20.4 * Beta * Massive update porting the mod to 1.20.4 NeoForge from 1.12.2, list is non-exhaustive, and some features may not be implemented yet.