Removed putting batteries in drills because of battery discharge mode

This commit is contained in:
Ellpeck 2016-11-26 18:28:14 +01:00
parent a910989501
commit 3176bafd2b
3 changed files with 3 additions and 33 deletions

View file

@ -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();
}

View file

@ -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<ItemStack> 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;

View file

@ -903,7 +903,7 @@ booklet.actuallyadditions.chapter.potionRings.name=Potion Rings
booklet.actuallyadditions.chapter.potionRings.text.1=<item>Potion Rings<r> can permanenty grant a set of potion effects. <n>A <item>Potion Ring<r> has <imp>two tiers<r>. The first tier needs to be <imp>held in any hand<r> and gives an effect of <imp>level one<r> while the second tier can be <imp>anywhere inside the inventory<r> and grants an effect of <imp>level two<r>. <n>To be able to use <item>Potion Rings<r> they first have to be <imp>filled up<r> with <item>Blaze Powder<r>. To do this, put the ring into a <imp>Crafting Grid<r> with <imp>one or more<r> Blaze Powder. <n>Over time, the powder inside the ring will be <imp>used up<r> to grant you the effect.
booklet.actuallyadditions.chapter.drill.name=Drills
booklet.actuallyadditions.chapter.drill.text.1=The <item>Drill<r> works like a Pickaxe and a Shovel. It uses <imp>CF<r> per block. It can be <imp>charged in an Energizer<r> and upgraded by <imp>sneak-right-clicking<r> with it in your hand. There is <imp>a lot of upgrades<r>, but here is an explanation of some of them: <n>The <item>Mining Uprgades<r> enlarge the hole which the Drill digs. <n>The <item>Placement Upgrade<r>, after you right-click it in any slot of your hotbar, will make the Drill able to <imp>place a block from that slot by right-clicking<r>. You can also put a <item>Battery<r> inside the Drill to give it more charge.
booklet.actuallyadditions.chapter.drill.text.1=The <item>Drill<r> works like a Pickaxe and a Shovel. It uses <imp>CF<r> per block. It can be <imp>charged in an Energizer<r> and upgraded by <imp>sneak-right-clicking<r> with it in your hand. There is <imp>a lot of upgrades<r>, but here is an explanation of some of them: <n>The <item>Mining Uprgades<r> enlarge the hole which the Drill digs. <n>The <item>Placement Upgrade<r>, after you right-click it in any slot of your hotbar, will make the Drill able to <imp>place a block from that slot by right-clicking<r>.
booklet.actuallyadditions.chapter.drill.text.2=It should be noted that, in fact, the <item>Speed<r>, <item>Mining<r> and <item>Fortune Upgrades<r> <imp>need their previous tiers to be installed<r> for them to work. <n>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 <item>Drill<r> can also be <imp>dyed<r> in Minecraft's 16 colors. <n>It's only cosmetic and won't have any effect other than it looking different, however.