From 3176bafd2b2b1bf087d431c7e949b85a1e51b203 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 26 Nov 2016 18:28:14 +0100 Subject: [PATCH] Removed putting batteries in drills because of battery discharge mode --- .../mod/inventory/ContainerDrill.java | 4 +-- .../mod/items/ItemDrill.java | 30 ------------------- .../assets/actuallyadditions/lang/en_US.lang | 2 +- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java index d46d61e40..3a9ff6e29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java @@ -45,7 +45,7 @@ public class ContainerDrill extends Container{ this.addSlotToContainer(new Slot(this.drillInventory, i, 44+i*18, 19){ @Override public boolean isItemValid(ItemStack stack){ - return stack.getItem() instanceof ItemDrillUpgrade || stack.getItem() instanceof IEnergyContainerItem || (ActuallyAdditions.teslaLoaded && stack.hasCapability(TeslaUtil.teslaProducer, null)); + return stack.getItem() instanceof ItemDrillUpgrade; } }); } @@ -86,7 +86,7 @@ public class ContainerDrill extends Container{ //Other Slots in Inventory excluded if(slot >= inventoryStart){ //Shift from Inventory - if(newStack.getItem() instanceof ItemDrillUpgrade || newStack.getItem() instanceof IEnergyContainerItem || (ActuallyAdditions.teslaLoaded && newStack.hasCapability(TeslaUtil.teslaProducer, null))){ + if(newStack.getItem() instanceof ItemDrillUpgrade){ if(!this.mergeItemStack(newStack, 0, 5, false)){ return StackUtil.getNull(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index 40ebe80b5..d9f0efd77 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -188,36 +188,6 @@ public class ItemDrill extends ItemEnergy{ return true; } - //Checks for Energy Containers in the Upgrade Slots and charges the Drill from them - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ - NonNullList slots = StackUtil.createSlots(ContainerDrill.SLOT_AMOUNT); - loadSlotsFromNBT(slots, stack); - if(slots != null && slots.size() > 0){ - for(ItemStack slotStack : slots){ - if(StackUtil.isValid(slotStack)){ - Item item = slotStack.getItem(); - - int extracted = 0; - int maxExtract = this.getMaxEnergyStored(stack)-this.getEnergyStored(stack); - if(item instanceof IEnergyContainerItem){ - extracted = ((IEnergyContainerItem)item).extractEnergy(slotStack, maxExtract, false); - } - else if(ActuallyAdditions.teslaLoaded && slotStack.hasCapability(TeslaUtil.teslaProducer, null)){ - ITeslaProducer cap = slotStack.getCapability(TeslaUtil.teslaProducer, null); - if(cap != null){ - extracted = (int)cap.takePower(maxExtract, false); - } - } - - if(extracted > 0){ - this.receiveEnergy(stack, extracted, false); - } - } - } - } - } - @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.EPIC; diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index b1d21026c..6f870783a 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -903,7 +903,7 @@ booklet.actuallyadditions.chapter.potionRings.name=Potion Rings booklet.actuallyadditions.chapter.potionRings.text.1=Potion Rings can permanenty grant a set of potion effects. A Potion Ring has two tiers. The first tier needs to be held in any hand and gives an effect of level one while the second tier can be anywhere inside the inventory and grants an effect of level two. To be able to use Potion Rings they first have to be filled up with Blaze Powder. To do this, put the ring into a Crafting Grid with one or more Blaze Powder. Over time, the powder inside the ring will be used up to grant you the effect. booklet.actuallyadditions.chapter.drill.name=Drills -booklet.actuallyadditions.chapter.drill.text.1=The Drill works like a Pickaxe and a Shovel. It uses CF per block. It can be charged in an Energizer and upgraded by sneak-right-clicking with it in your hand. There is a lot of upgrades, but here is an explanation of some of them: The Mining Uprgades enlarge the hole which the Drill digs. The Placement Upgrade, after you right-click it in any slot of your hotbar, will make the Drill able to place a block from that slot by right-clicking. You can also put a Battery inside the Drill to give it more charge. +booklet.actuallyadditions.chapter.drill.text.1=The Drill works like a Pickaxe and a Shovel. It uses CF per block. It can be charged in an Energizer and upgraded by sneak-right-clicking with it in your hand. There is a lot of upgrades, but here is an explanation of some of them: The Mining Uprgades enlarge the hole which the Drill digs. The Placement Upgrade, after you right-click it in any slot of your hotbar, will make the Drill able to place a block from that slot by right-clicking. booklet.actuallyadditions.chapter.drill.text.2=It should be noted that, in fact, the Speed, Mining and Fortune Upgrades need their previous tiers to be installed for them to work. This means that, if you want Speed III in the Drill, it needs Speed II and Speed I inside it as well. booklet.actuallyadditions.chapter.drill.text.4=The Drill can also be dyed in Minecraft's 16 colors. It's only cosmetic and won't have any effect other than it looking different, however.