mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 19:59:58 +00:00
Unify IProgressTile usage, only implement where needed.
Tons of cleanup everywhere, implement final methods in TileEntityEio
This commit is contained in:
1 parent
adabb82f72
commit
57f665a03e
49 files changed
+176
-196
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import crazypants.enderio.machine.AbstractMachineEntity;
|
||||
import crazypants.enderio.machine.SlotDefinition;
|
||||
import crazypants.util.IProgressTile;
|
||||
|
||||
public abstract class AbstractMachineContainer extends Container {
|
||||
|
||||
@@ -243,4 +244,14 @@ public abstract class AbstractMachineContainer extends Container {
|
||||
return result;
|
||||
}
|
||||
|
||||
protected int getProgressScaled(int scale) {
|
||||
if(getTileEntity() instanceof IProgressTile) {
|
||||
getProgressScaled(scale, (IProgressTile) getTileEntity());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int getProgressScaled(int scale, IProgressTile tile) {
|
||||
return (int) (tile.getProgress() * scale);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user