mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-21 23:13:28 +01:00
Fixed drill attributes going haywire.
Bumped for release.
This commit is contained in:
parent
9eec468f7c
commit
0ebbd811fd
3 changed files with 20 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -62,8 +62,15 @@ public class DrillItem extends ItemEnergy {
|
|||
private static final int ENERGY_USE = 100;
|
||||
private static final List<ToolAction> ACTIONS = List.of(ToolActions.SHOVEL_DIG, ToolActions.PICKAXE_DIG);
|
||||
|
||||
private final Multimap<Attribute, AttributeModifier> attributes_unpowered = ArrayListMultimap.create();
|
||||
private final Multimap<Attribute, AttributeModifier> 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<Attribute, AttributeModifier> getAttributeModifiers(@Nonnull EquipmentSlot slot, @Nonnull ItemStack stack) {
|
||||
Multimap<Attribute, AttributeModifier> 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue