Too hot a fix

- Potential fix to outside-dev server startup
- Removed unnecessary toolbox recipes
- Fixed absolute coords in toolbox screen
This commit is contained in:
simibubi 2021-10-23 03:20:55 +02:00
parent 3a186c1286
commit 140a4a2463
6 changed files with 21 additions and 69 deletions

View file

@ -1884,7 +1884,6 @@ d06d9445256ae19d0a8a37e97983b168fd4d774e data/create/advancements/recipes/create
acdf76187497b3101e9ec6101e2164e11277a68a data/create/advancements/recipes/create.base/crafting/curiosities/blue_toolbox_from_main_toolbox.json
3a8b083c1f4c67feade27a877e774f435b8e58da data/create/advancements/recipes/create.base/crafting/curiosities/blue_toolbox_from_other_toolbox.json
bb138bedd2aec741fa54b6b52be384fdbd741249 data/create/advancements/recipes/create.base/crafting/curiosities/brown_toolbox.json
963555b6f24b35150769c3ff68a9a57c4968c9a6 data/create/advancements/recipes/create.base/crafting/curiosities/brown_toolbox_from_main_toolbox.json
502e8ea5b0f9cc0ca90a1018d907ffe6f3b051a3 data/create/advancements/recipes/create.base/crafting/curiosities/brown_toolbox_from_other_toolbox.json
f2afe58a26566aac8abce76f0ab6d0924c5badb6 data/create/advancements/recipes/create.base/crafting/curiosities/cyan_toolbox_from_main_toolbox.json
dea244d3f78e4aaf13132d48dcf071e5046bf154 data/create/advancements/recipes/create.base/crafting/curiosities/cyan_toolbox_from_other_toolbox.json
@ -3035,7 +3034,6 @@ e89b2dd52cfe2d4d723f49aeec8f4f8c37a82dca data/create/recipes/crafting/curiositie
5588aa83b6fbb2ee3dc01e95b3261ccc38e40ad1 data/create/recipes/crafting/curiosities/blue_toolbox_from_main_toolbox.json
19c9fe34e311e7a11114acc10cc3777fc95ed3ab data/create/recipes/crafting/curiosities/blue_toolbox_from_other_toolbox.json
4754ca20a7efdf382f32be150f38bdf4e8183fc4 data/create/recipes/crafting/curiosities/brown_toolbox.json
7635daa89502a79cc5b99b146c1097fa166958e5 data/create/recipes/crafting/curiosities/brown_toolbox_from_main_toolbox.json
14a85c9011a6ca667ac83e95dd7e8eabfac4a4c5 data/create/recipes/crafting/curiosities/brown_toolbox_from_other_toolbox.json
39e6d65af1c8ca0dec19e5b15a2f0e28e69542eb data/create/recipes/crafting/curiosities/cyan_toolbox_from_main_toolbox.json
39e055d841536e691c798acc09145f821eeb32ae data/create/recipes/crafting/curiosities/cyan_toolbox_from_other_toolbox.json

View file

@ -1,32 +0,0 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"create:crafting/curiosities/brown_toolbox_from_main_toolbox"
]
},
"criteria": {
"has_toolbox": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "create:toolboxes"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "create:crafting/curiosities/brown_toolbox_from_main_toolbox"
}
}
},
"requirements": [
[
"has_toolbox",
"has_the_recipe"
]
]
}

View file

@ -1,18 +0,0 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"#",
"-"
],
"key": {
"#": {
"tag": "forge:dyes/brown"
},
"-": {
"item": "create:brown_toolbox"
}
},
"result": {
"item": "create:brown_toolbox"
}
}

View file

@ -1380,14 +1380,14 @@ public class AllBlocks {
.define('-', AllItemTags.TOOLBOXES.tag)
.unlockedBy("has_toolbox", RegistrateRecipeProvider.hasItem(AllItemTags.TOOLBOXES.tag))
.save(p, Create.asResource("crafting/curiosities/" + c.getName() + "_from_other_toolbox"));
ShapedRecipeBuilder.shaped(c.get())
.pattern("#")
.pattern("-")
.define('#', DyeHelper.getTagOfDye(colour))
.define('-', ToolboxBlock.getMainBox())
.unlockedBy("has_toolbox", RegistrateRecipeProvider.hasItem(AllItemTags.TOOLBOXES.tag))
.save(p, Create.asResource("crafting/curiosities/" + c.getName() + "_from_main_toolbox"));
if (colour != DyeColor.BROWN)
ShapedRecipeBuilder.shaped(c.get())
.pattern("#")
.pattern("-")
.define('#', DyeHelper.getTagOfDye(colour))
.define('-', ToolboxBlock.getMainBox())
.unlockedBy("has_toolbox", RegistrateRecipeProvider.hasItem(AllItemTags.TOOLBOXES.tag))
.save(p, Create.asResource("crafting/curiosities/" + c.getName() + "_from_main_toolbox"));
})
.onRegisterAfter(Item.class, v -> TooltipHelper.referTo(v, "block.create.toolbox"))
.tag(AllBlockTags.TOOLBOXES.tag)

View file

@ -53,7 +53,8 @@ public class ToolboxScreen extends AbstractSimiContainerScreen<ToolboxContainer>
widgets.add(disposeButton);
color = menu.contentHolder.getColor();
extraAreas = ImmutableList.of(new Rectangle2d(118, 155, 80, 100), new Rectangle2d(308, 125, 100, 70));
extraAreas = ImmutableList.of(new Rectangle2d(getGuiLeft() + -28, getGuiTop() + 141, 80, 100),
new Rectangle2d(getGuiLeft() + 162, getGuiTop() + 111, 100, 70));
}
@Override
@ -114,7 +115,7 @@ public class ToolboxScreen extends AbstractSimiContainerScreen<ToolboxContainer>
private void renderToolbox(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
ms.pushPose();
ms.translate(397, 190, 100);
ms.translate(leftPos + 247, topPos + 180, 100);
MatrixTransformStack.of(ms)
.scale(50)
.rotateX(-22)

View file

@ -218,19 +218,22 @@ public class CreateRegistrate extends AbstractRegistrate<CreateRegistrate> {
public static <T extends Item, P> NonNullUnaryOperator<ItemBuilder<T, P>> customRenderedItem(
Supplier<Supplier<CustomRenderedItemModelRenderer<?>>> supplier) {
return b -> b.properties(p -> p.setISTER(() -> () -> supplier.get().get()))
.onRegister(entry -> onClient(() -> () -> {
ItemStackTileEntityRenderer ister = entry.getItemStackTileEntityRenderer();
if (ister instanceof CustomRenderedItemModelRenderer) {
registerCustomRenderedItem(entry, (CustomRenderedItemModelRenderer<?>) ister);
}
}));
return b -> b.properties(p -> p.setISTER(() -> () -> supplier.get()
.get()))
.onRegister(entry -> onClient(() -> () -> registerCustomRenderedItem(entry)));
}
protected static void onClient(Supplier<Runnable> toRun) {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, toRun);
}
@OnlyIn(Dist.CLIENT)
private static void registerCustomRenderedItem(Item entry) {
ItemStackTileEntityRenderer ister = entry.getItemStackTileEntityRenderer();
if (ister instanceof CustomRenderedItemModelRenderer)
registerCustomRenderedItem(entry, (CustomRenderedItemModelRenderer<?>) ister);
}
@OnlyIn(Dist.CLIENT)
private static void registerCTBehviour(Block entry, ConnectedTextureBehaviour behavior) {
CreateClient.MODEL_SWAPPER.getCustomBlockModels()