Better crafter GUI
This commit is contained in:
@@ -14,7 +14,7 @@ public class ContainerCrafter extends ContainerStorage {
|
|||||||
public ContainerCrafter(EntityPlayer player, TileCrafter crafter) {
|
public ContainerCrafter(EntityPlayer player, TileCrafter crafter) {
|
||||||
super(player);
|
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() {
|
addSlotToContainer(new SlotFiltered(crafter, i, 8, 19 + (i * 18), new IItemValidator() {
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemStack stack) {
|
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) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
addSlotToContainer(new SlotFiltered(crafter, 6 + i, 187, 6 + (i * 18), new IItemValidator() {
|
addSlotToContainer(new SlotFiltered(crafter, 6 + i, 187, 6 + (i * 18), new IItemValidator() {
|
||||||
@Override
|
@Override
|
||||||
@@ -41,7 +32,7 @@ public class ContainerCrafter extends ContainerStorage {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
addPlayerInventory(8, 90);
|
addPlayerInventory(8, 144);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class GuiCrafter extends GuiBase {
|
|||||||
private TileCrafter crafter;
|
private TileCrafter crafter;
|
||||||
|
|
||||||
public GuiCrafter(ContainerCrafter container, TileCrafter crafter) {
|
public GuiCrafter(ContainerCrafter container, TileCrafter crafter) {
|
||||||
super(container, 211, 173);
|
super(container, 211, 226);
|
||||||
|
|
||||||
this.crafter = crafter;
|
this.crafter = crafter;
|
||||||
}
|
}
|
||||||
@@ -41,13 +41,13 @@ public class GuiCrafter extends GuiBase {
|
|||||||
@Override
|
@Override
|
||||||
public void drawForeground(int mouseX, int mouseY) {
|
public void drawForeground(int mouseX, int mouseY) {
|
||||||
drawString(7, 7, t("gui.refinedstorage:crafter"));
|
drawString(7, 7, t("gui.refinedstorage:crafter"));
|
||||||
drawString(7, 77, t("container.inventory"));
|
drawString(7, 131, t("container.inventory"));
|
||||||
|
|
||||||
RenderHelper.enableGUIStandardItemLighting();
|
RenderHelper.enableGUIStandardItemLighting();
|
||||||
|
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
int x = i >= 3 ? 109 : 27;
|
int x = 27;
|
||||||
int y = 19 + ((i - (i >= 3 ? 3 : 0)) * 18);
|
int y = 19 + (i * 18);
|
||||||
|
|
||||||
if (crafter.getStackInSlot(i) != null) {
|
if (crafter.getStackInSlot(i) != null) {
|
||||||
ItemStack result = ItemPattern.getResult(crafter.getStackInSlot(i));
|
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 |
Reference in New Issue
Block a user