Moving the handling of progress to GuiProgressBar
Adds an interface providing data for GuiProgressBar Changed all containers simulating progress to implement the interface
This commit is contained in:
@@ -5,6 +5,7 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.container.slot.SlotOutput;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.recipes.handlers.Inscribe;
|
||||
@@ -12,7 +13,7 @@ import appeng.recipes.handlers.Inscribe.InscriberRecipe;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerInscriber extends ContainerUpgradeable
|
||||
public class ContainerInscriber extends ContainerUpgradeable implements IProgressProvider
|
||||
{
|
||||
|
||||
TileInscriber ti;
|
||||
@@ -157,4 +158,16 @@ public class ContainerInscriber extends ContainerUpgradeable
|
||||
this.processingTime = ti.processingTime;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return processingTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxProgress()
|
||||
{
|
||||
return maxProcessingTime;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user