Items use energy to do work. Closes #1770
This commit is contained in:
parent
4012a69fab
commit
56d1d196f0
11 changed files with 14 additions and 12 deletions
|
@ -119,6 +119,8 @@ public class BlockRubberLog extends LogBlock {
|
|||
if (stack.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO: Should it be here??
|
||||
ItemPowerManager capEnergy = null;
|
||||
if (stack.getItem() instanceof ItemElectricTreetap) {
|
||||
capEnergy = new ItemPowerManager(stack);
|
||||
|
@ -130,7 +132,7 @@ public class BlockRubberLog extends LogBlock {
|
|||
0.6F, 1F);
|
||||
if (!worldIn.isClient) {
|
||||
if (capEnergy != null) {
|
||||
capEnergy.extractEnergy(20, false);
|
||||
capEnergy.useEnergy(20, false);
|
||||
|
||||
ExternalPowerSystems.requestEnergyFromArmor(capEnergy, playerIn);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue