Skip to content

Commit 6745608

Browse files
authored
Merge pull request #20 from CodeMonkeysMods/New-GUIs
Added Custom Gui for the Furnace and Campfire and moved Slots accordingly
2 parents eed85fa + 0835d2a commit 6745608

8 files changed

Lines changed: 19 additions & 21 deletions

File tree

src/client/java/com/tcm/MineTale/block/workbenches/screen/CampfireWorkbenchScreen.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.tcm.MineTale.block.workbenches.screen;
22

3+
import com.tcm.MineTale.MineTale;
34
import com.tcm.MineTale.block.workbenches.menu.CampfireWorkbenchMenu;
45

56
import net.minecraft.client.gui.GuiGraphics;
@@ -11,9 +12,7 @@
1112

1213
public class CampfireWorkbenchScreen extends AbstractContainerScreen<CampfireWorkbenchMenu> {
1314
private static final Identifier TEXTURE =
14-
// Identifier.fromNamespaceAndPath(MineTale.MOD_ID, "textures/gui/container/furnace_workbench.png");
15-
Identifier.withDefaultNamespace("textures/gui/container/furnace.png");
16-
15+
Identifier.fromNamespaceAndPath(MineTale.MOD_ID, "textures/gui/container/furnace_workbench.png");
1716
/**
1817
* Creates a campfire workbench screen for the provided menu, player inventory, and title.
1918
*

src/client/java/com/tcm/MineTale/block/workbenches/screen/FurnaceWorkbenchScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.tcm.MineTale.block.workbenches.screen;
22

3+
import com.tcm.MineTale.MineTale;
34
import com.tcm.MineTale.block.workbenches.menu.FurnaceWorkbenchMenu;
45

56
import net.minecraft.client.gui.GuiGraphics;
@@ -11,8 +12,7 @@
1112

1213
public class FurnaceWorkbenchScreen extends AbstractContainerScreen<FurnaceWorkbenchMenu> {
1314
private static final Identifier TEXTURE =
14-
// Identifier.fromNamespaceAndPath(MineTale.MOD_ID, "textures/gui/container/furnace_workbench.png");
15-
Identifier.withDefaultNamespace("textures/gui/container/furnace.png");
15+
Identifier.fromNamespaceAndPath(MineTale.MOD_ID, "textures/gui/container/furnace_workbench.png");
1616

1717
/**
1818
* Creates a new furnace workbench screen for the given menu, player inventory, and title.
File renamed without changes.

src/main/java/com/tcm/MineTale/block/workbenches/menu/AbstractWorkbenchContainerMenu.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public AbstractWorkbenchContainerMenu(@Nullable MenuType<?> menuType, int syncId
4343
container.startOpen(playerInventory.player);
4444

4545
// 1. Fuel Slot (Center-ish bottom)
46-
this.addSlot(new Slot(container, Constants.FUEL_SLOT, 80, 53) {
46+
this.addSlot(new Slot(container, Constants.FUEL_SLOT, 44, 53) {
4747
/**
4848
* Determines whether the given item stack is allowed in the fuel slot.
4949
*
@@ -57,14 +57,14 @@ public boolean mayPlace(ItemStack stack) {
5757
});
5858

5959
// 2. Two Input Slots (Stacked on the left)
60-
this.addSlot(new Slot(container, Constants.INPUT_1, 44, 17));
61-
this.addSlot(new Slot(container, Constants.INPUT_2, 44, 35));
60+
this.addSlot(new Slot(container, Constants.INPUT_1, 35, 17)); //LEFT
61+
this.addSlot(new Slot(container, Constants.INPUT_2, 53, 17)); //RIGHT
6262

6363
// 3. Four Output Slots (2x2 Grid on the right)
64-
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_START, 116, 21));
65-
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_START + 1, 134, 21));
66-
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_END - 1, 116, 39));
67-
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_END, 134, 39));
64+
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_START, 107, 26)); //TOP LEFT
65+
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_START + 1, 125, 26)); //TOP RIGHT
66+
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_END - 1, 107, 44)); //BOTTOM LEFT
67+
this.addSlot(new FurnaceResultSlot(playerInventory.player, container, Constants.OUTPUT_END, 125, 44)); //BOTTOM RIGHT
6868

6969
// --- PLAYER INVENTORY ---
7070
addPlayerInventory(playerInventory);
File renamed without changes.
2.95 KB
Loading

src/main/resources/fabric.mod.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
"schemaVersion": 1,
33
"id": "minetale",
44
"version": "${version}",
5-
"name": "Example mod",
6-
"description": "This is an example description! Tell everyone what your mod is about!",
5+
"name": "MineTale",
6+
"description": "Hytale in Minecraft",
77
"authors": [
8-
"Me!"
8+
"TheCodeMonkey",
9+
"AnyaPizza"
910
],
1011
"contact": {
1112
"homepage": "https://fabricmc.net/",
1213
"sources": "https://github.com/FabricMC/fabric-example-mod"
1314
},
1415
"license": "CC0-1.0",
15-
"icon": "assets/modid/icon.png",
16+
"icon": "assets/minetale/icon.png",
1617
"environment": "*",
1718
"entrypoints": {
1819
"main": [
@@ -26,9 +27,9 @@
2627
]
2728
},
2829
"mixins": [
29-
"modid.mixins.json",
30+
"minetale.mixins.json",
3031
{
31-
"config": "modid.client.mixins.json",
32+
"config": "minetale.client.mixins.json",
3233
"environment": "client"
3334
}
3435
],
@@ -38,7 +39,5 @@
3839
"java": ">=21",
3940
"fabric-api": "*"
4041
},
41-
"suggests": {
42-
"another-mod": "*"
43-
}
42+
"suggests": {}
4443
}

0 commit comments

Comments
 (0)