Skip to content

Commit 36f41dc

Browse files
committed
dont initialize AlloyForgery as early, fix REI texture (closes #46), fix creative tab again (closes #42 and #44)
1 parent d332456 commit 36f41dc

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ minecraft_version=1.18.2
77
yarn_mappings=1.18.2+build.1
88
loader_version=0.13.3
99
# Mod Properties
10-
mod_version=2.0.12
10+
mod_version=2.0.13
1111
maven_group=wraith
1212
archives_base_name=wraith-alloy-forgery
1313

src/main/java/wraith/alloyforgery/AlloyForgeryItemGroup.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ protected AlloyForgeryItemGroup(Identifier id) {
2323

2424
@Override
2525
public ItemStack createIcon() {
26-
return this.controllerCache != null && this.controllerCache.isEmpty() ? Items.BRICKS.getDefaultStack() : this.controllerCache.get(0);
26+
if (this.controllerCache == null) return Items.BRICKS.getDefaultStack();
27+
return this.controllerCache.isEmpty() ? Items.BRICKS.getDefaultStack() : this.controllerCache.get(0);
2728
}
2829

2930
@Override

src/main/java/wraith/alloyforgery/compat/LegacyIdMappings.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ public class LegacyIdMappings {
1111
private static final Map<Identifier, Identifier> MAPPINGS = new HashMap<>();
1212

1313
static {
14-
MAPPINGS.put(AlloyForgery.id("blackstone_forge_controller"), AlloyForgery.id("polished_blackstone_forge_controller"));
15-
MAPPINGS.put(AlloyForgery.id("brick_forge_controller"), AlloyForgery.id("bricks_forge_controller"));
16-
MAPPINGS.put(AlloyForgery.id("deepslate_forge_controller"), AlloyForgery.id("deepslate_bricks_forge_controller"));
17-
MAPPINGS.put(AlloyForgery.id("end_stone_forge_controller"), AlloyForgery.id("end_stone_bricks_forge_controller"));
18-
MAPPINGS.put(AlloyForgery.id("stone_brick_forge_controller"), AlloyForgery.id("stone_bricks_forge_controller"));
14+
MAPPINGS.put(id("blackstone_forge_controller"), id("polished_blackstone_forge_controller"));
15+
MAPPINGS.put(id("brick_forge_controller"), id("bricks_forge_controller"));
16+
MAPPINGS.put(id("deepslate_forge_controller"), id("deepslate_bricks_forge_controller"));
17+
MAPPINGS.put(id("end_stone_forge_controller"), id("end_stone_bricks_forge_controller"));
18+
MAPPINGS.put(id("stone_brick_forge_controller"), id("stone_bricks_forge_controller"));
1919
}
2020

2121
public static Identifier remap(Identifier original) {
2222
return MAPPINGS.getOrDefault(original, original);
2323
}
24+
25+
private static Identifier id(String path) {
26+
return new Identifier(AlloyForgery.MOD_ID, path);
27+
}
2428
}

src/main/java/wraith/alloyforgery/compat/rei/AlloyForgeryPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void registerCategories(CategoryRegistry registry) {
2424
@Override
2525
public void registerScreens(ScreenRegistry registry) {
2626
registry.registerClickArea(screen -> {
27-
return new Rectangle(screen.rootX() + 142, screen.rootY() + 4, 21, 24);
27+
return new Rectangle(screen.rootX() + 142, screen.rootY() + 20, 21, 24);
2828
}, AlloyForgeScreen.class, AlloyForgingCategory.ID);
2929
}
3030

src/main/java/wraith/alloyforgery/compat/rei/AlloyForgingCategory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public List<Widget> setupDisplay(AlloyForgingDisplay display, Rectangle bounds)
5050

5151
widgets.add(Widgets.createRecipeBase(bounds));
5252

53-
widgets.add(Widgets.createTexturedWidget(GUI_TEXTURE, origin.x + 10, origin.y + 18, 42, 5, 124, 58));
53+
widgets.add(Widgets.createTexturedWidget(GUI_TEXTURE, origin.x + 10, origin.y + 18, 42, 21, 124, 58));
5454
widgets.add(Widgets.createTexturedWidget(GUI_TEXTURE, origin.x + 115, origin.y + 21, 176, 0, 15, 19));
5555

5656
for (int i = 0; i < display.getInputEntries().size(); i++) {

0 commit comments

Comments
 (0)