diff --git a/src/main/java/gay/debuggy/architecture_extensions/resource/DataGeneration.java b/src/main/java/gay/debuggy/architecture_extensions/resource/DataGeneration.java index 29e7616..2b72d3c 100644 --- a/src/main/java/gay/debuggy/architecture_extensions/resource/DataGeneration.java +++ b/src/main/java/gay/debuggy/architecture_extensions/resource/DataGeneration.java @@ -92,44 +92,44 @@ private static void generateModels(TypedGroupedBlock block) { if (rawModel.contains(textureId)) model.addTexture(textureId, textureConfiguration.apply(block.type(), textureId)); } - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.CLIENT_RESOURCES, Identifier.of(MOD_ID, (modelId.getNamespace(), modelId.getPath() + variant + ".json"), path -> model.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.CLIENT_RESOURCES, Identifier.of(MOD_ID, modelId.getNamespace() + modelId.getPath() + variant + ".json"), path -> model.serialize().toString()); } var itemModel = "{\"parent\":\"" + modelId.toString().replaceFirst("models/", "") + "\"}"; - ArchitectureExtensions.RESOURCE_PACK.putText(ResourceType.CLIENT_RESOURCES, Identifier.of(MOD_ID, (modelId.getNamespace(), modelId.getPath().replaceFirst("block", "item") + ".json"), itemModel); + ArchitectureExtensions.RESOURCE_PACK.putText(ResourceType.CLIENT_RESOURCES, Identifier.of(MOD_ID, modelId.getNamespace() + modelId.getPath().replaceFirst("block", "item") + ".json"), itemModel); } private static void generateBlockState(TypedGroupedBlock block) { var rawBlockState = getBlockStateTemplate(block.type()); if (rawBlockState == null) return; var blockState = new BlockStateTemplate(rawBlockState); - blockState.addConstant(MODEL_PLACEHOLDER, Identifier.of(MOD_ID, (block.id().getNamespace(), "block/" + block.id().getPath()).toString()); + blockState.addConstant(MODEL_PLACEHOLDER, Identifier.of(MOD_ID, block.id().getNamespace()) + "block/" + block.id().getPath()).toString(); ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.CLIENT_RESOURCES, Identifier.of(MOD_ID, (block.id().getNamespace(), "blockstates/" + block.id().getPath() + ".json"), path -> blockState.serialize().toString()); } private static void generateMineableByPickaxeTag() { var tag = TagTemplate.DEFAULT.get(); BLOCKS.forEach(block -> { if (BlockContentRegistries.STRIPPABLE.get(block.groupedBlock().baseBlock().get()).isEmpty()) tag.addValue(block.id().toString()); }); - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, ("tags/blocks/mineable/pickaxe.json"), path -> tag.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, "tags/blocks/mineable/pickaxe.json"), path -> tag.serialize().toString()); } private static void generateMineableByAxeTag() { var tag = TagTemplate.DEFAULT.get(); BLOCKS.forEach(block -> { if (BlockContentRegistries.STRIPPABLE.get(block.groupedBlock().baseBlock().get()).isPresent()) tag.addValue(block.id().toString()); }); - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, ("tags/blocks/mineable/axe.json"), path -> tag.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, "tags/blocks/mineable/axe.json"), path -> tag.serialize().toString()); } private static void generateNeedsStoneToolTag() { var tag = TagTemplate.DEFAULT.get(); BLOCKS.forEach(block -> tag.addValue(block.id().toString())); - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, ("tags/blocks/needs_stone_tool.json"), path -> tag.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, "tags/blocks/needs_stone_tool.json"), path -> tag.serialize().toString()); } private static void generateLootTables() { for (TypedGroupedBlock block : BLOCKS) { var lootTable = LootTableTemplate.BLOCK_BREAK.get(); lootTable.addPool(JPool.ofItems(block.id()).addCondition(JCondition.SURVIVES_EXPLOSION.get())); - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, (block.id().getNamespace(), "loot_tables/blocks/" + block.id().getPath() + ".json"), path -> lootTable.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, block.id().getNamespace() + "loot_tables/blocks/" + block.id().getPath() + ".json"), path -> lootTable.serialize().toString()); } } @@ -148,7 +148,7 @@ private static void generateRecipes() { final var path = template.tablesaw() ? "custom_recipes/tablesaw/" : "recipes/"; final var prefix = template.simple() ? "" : block.id().getPath() + "_"; - ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, (block.id().getNamespace(), path + prefix + template.id() + ".json"), blah -> recipe.serialize().toString()); + ArchitectureExtensions.RESOURCE_PACK.putTextAsync(ResourceType.SERVER_DATA, Identifier.of(MOD_ID, block.id().getNamespace() + path + prefix + template.id() + ".json"), blah -> recipe.serialize().toString()); } templates.clear(); }