Add changed files

This commit is contained in:
Aria 2023-02-01 19:50:32 -07:00
parent 91fdf78a57
commit 468df6d07e
4 changed files with 1620 additions and 0 deletions

View file

@ -0,0 +1,42 @@
package dev.zontreck.otemod.implementation;
import net.minecraftforge.energy.EnergyStorage;
public abstract class OTEEnergy extends EnergyStorage
{
public OTEEnergy(int capacity, int maxTransfer) {
super(capacity, maxTransfer);
}
@Override
public int extractEnergy(int max, boolean simulate)
{
int ex = super.extractEnergy(max, simulate);
if(ex != 0){
onChanged();
}
return ex;
}
@Override
public int receiveEnergy(int max, boolean simulate)
{
int rcv = super.receiveEnergy(max, simulate);
if(rcv!=0){
onChanged();
}
return rcv;
}
public int setEnergy(int energy){
this.energy=energy;
onChanged();
return energy;
}
public abstract void onChanged();
}

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B