Better crafter GUI

This commit is contained in:
Raoul Van den Berge
2016-04-30 14:36:41 +02:00
parent ee24a45630
commit 4dd3dd44b3
3 changed files with 6 additions and 15 deletions

View File

@@ -14,7 +14,7 @@ public class ContainerCrafter extends ContainerStorage {
public ContainerCrafter(EntityPlayer player, TileCrafter crafter) {
super(player);
for (int i = 0; i < 3; ++i) {
for (int i = 0; i < 6; ++i) {
addSlotToContainer(new SlotFiltered(crafter, i, 8, 19 + (i * 18), new IItemValidator() {
@Override
public boolean isValid(ItemStack stack) {
@@ -23,15 +23,6 @@ public class ContainerCrafter extends ContainerStorage {
}));
}
for (int i = 3; i < 6; ++i) {
addSlotToContainer(new SlotFiltered(crafter, i, 89, 19 + ((i - 3) * 18), new IItemValidator() {
@Override
public boolean isValid(ItemStack stack) {
return stack.getItem() == RefinedStorageItems.PATTERN && ItemPattern.hasResult(stack);
}
}));
}
for (int i = 0; i < 4; ++i) {
addSlotToContainer(new SlotFiltered(crafter, 6 + i, 187, 6 + (i * 18), new IItemValidator() {
@Override
@@ -41,7 +32,7 @@ public class ContainerCrafter extends ContainerStorage {
}));
}
addPlayerInventory(8, 90);
addPlayerInventory(8, 144);
}
@Override

View File

@@ -12,7 +12,7 @@ public class GuiCrafter extends GuiBase {
private TileCrafter crafter;
public GuiCrafter(ContainerCrafter container, TileCrafter crafter) {
super(container, 211, 173);
super(container, 211, 226);
this.crafter = crafter;
}
@@ -41,13 +41,13 @@ public class GuiCrafter extends GuiBase {
@Override
public void drawForeground(int mouseX, int mouseY) {
drawString(7, 7, t("gui.refinedstorage:crafter"));
drawString(7, 77, t("container.inventory"));
drawString(7, 131, t("container.inventory"));
RenderHelper.enableGUIStandardItemLighting();
for (int i = 0; i < 6; ++i) {
int x = i >= 3 ? 109 : 27;
int y = 19 + ((i - (i >= 3 ? 3 : 0)) * 18);
int x = 27;
int y = 19 + (i * 18);
if (crafter.getStackInSlot(i) != null) {
ItemStack result = ItemPattern.getResult(crafter.getStackInSlot(i));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB