Fix slot alignment in autocrafting Gui

This commit is contained in:
modmuss50 2017-06-21 10:00:53 +01:00
parent e962f44fb3
commit 0e9c61bd60
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
2 changed files with 11 additions and 8 deletions

View file

@ -64,7 +64,9 @@ public class GuiAutoCrafting extends GuiBase {
if(recipe != null){ if(recipe != null){
renderItemStack(recipe.getRecipeOutput(), 95, 42); renderItemStack(recipe.getRecipeOutput(), 95, 42);
} }
final Layer layer = Layer.FOREGROUND;
this.builder.drawMultiEnergyBar(this, 9, 26, (int) this.tileAutoCraftingTable.getEnergy(), (int) this.tileAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer);
this.builder.drawProgressBar(this, 50, 100, 120, 44, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
} }
@Override @Override
@ -78,8 +80,6 @@ public class GuiAutoCrafting extends GuiBase {
} }
drawOutputSlot(145, 42, layer); drawOutputSlot(145, 42, layer);
drawOutputSlot(95, 42, layer); drawOutputSlot(95, 42, layer);
this.builder.drawMultiEnergyBar(this, 9, 26, (int) this.tileAutoCraftingTable.getEnergy(), (int) this.tileAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer);
this.builder.drawProgressBar(this, 50, 100, 120, 44, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
} }
@Override @Override

View file

@ -42,7 +42,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
@Override @Override
public double getBaseMaxPower() { public double getBaseMaxPower() {
return 0; return 10000;
} }
@Override @Override
@ -52,12 +52,12 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
@Override @Override
public double getBaseMaxInput() { public double getBaseMaxInput() {
return 0; return 32;
} }
@Override @Override
public boolean canAcceptEnergy(EnumFacing enumFacing) { public boolean canAcceptEnergy(EnumFacing enumFacing) {
return false; return true;
} }
@Override @Override
@ -68,8 +68,11 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
@Override @Override
public BuiltContainer createContainer(EntityPlayer player) { public BuiltContainer createContainer(EntityPlayer player) {
return new ContainerBuilder("autocraftingTable").player(player.inventory).inventory().hotbar() return new ContainerBuilder("autocraftingTable").player(player.inventory).inventory().hotbar()
.addInventory().tile(this).slot(0, 30, 20).slot(1, 50, 20).slot(2, 70, 20).slot(3, 90, 20) .addInventory().tile(this)
.slot(4, 110, 20).slot(5, 130, 20).outputSlot(6, 40, 66).addInventory() .slot(0, 28, 25).slot(1, 46, 25).slot(2, 64, 25)
.slot(3, 28, 43).slot(4, 46, 43).slot(5, 64, 43)
.slot(6, 28, 61).slot(7, 46, 61).slot(8, 64, 61)
.outputSlot(9, 145, 42).addInventory()
.create(); .create();
} }