From f511e2b3466d15f118722b52aa5d57e8c861622a Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 3 Mar 2021 20:32:51 +0200 Subject: [PATCH] Clean up --- .../minelittlepony/unicopia/item/AmuletItem.java | 16 +++------------- .../com/minelittlepony/unicopia/item/UItems.java | 4 ++-- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/item/AmuletItem.java b/src/main/java/com/minelittlepony/unicopia/item/AmuletItem.java index f800f36a..cbdecc1b 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/AmuletItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/AmuletItem.java @@ -31,31 +31,21 @@ import net.minecraft.world.World; public class AmuletItem extends WearableItem { private final int maxEnergy; - private final float drain; private final ImmutableMultimap modifiers; - public AmuletItem(FabricItemSettings settings, int maxEnergy, int drainRate) { - this(settings, maxEnergy, drainRate, ImmutableMultimap.builder()); + public AmuletItem(FabricItemSettings settings, int maxEnergy) { + this(settings, maxEnergy, ImmutableMultimap.builder()); } - public AmuletItem(FabricItemSettings settings, int maxEnergy, int drainRate, ImmutableMultimap.Builder modifiers) { + public AmuletItem(FabricItemSettings settings, int maxEnergy, ImmutableMultimap.Builder modifiers) { super(settings); this.maxEnergy = maxEnergy; - drain = ((float)drainRate / (float)maxEnergy) / 10; - this.modifiers = modifiers.build(); } @Override public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) { - /*if (world.isClient) { - return; - } - if (isChargable() && entity instanceof LivingEntity && ((LivingEntity) entity).getEquippedStack(EquipmentSlot.CHEST) == stack) { - consumeEnergy(stack, drain); - }*/ - if (this == UItems.PEGASUS_AMULET && entity.world.getTime() % 6 == 0 && entity instanceof LivingEntity diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 7e0d386c..2510c871 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -64,11 +64,11 @@ public interface UItems { AmuletItem PEGASUS_AMULET = register("pegasus_amulet", new AmuletItem(new FabricItemSettings() .maxDamage(890) .rarity(Rarity.UNCOMMON) - .group(ItemGroup.DECORATIONS), 900, 10)); + .group(ItemGroup.DECORATIONS), 900)); /*AmuletItem ALICORN_AMULET = register("alicorn_amulet", new AmuletItem(new AmuletItem.Settings("alicorn_amulet") .toughness(900000000) .resistance(90000000) - .group(ItemGroup.DECORATIONS), 0, 0));*/ + .group(ItemGroup.DECORATIONS), 0));*/ static T register(String name, T item) { ITEMS.add(item);