From c0805c4d21e2e26a3d2769f0fefc3e59daacdc1b Mon Sep 17 00:00:00 2001 From: maple! Date: Thu, 18 Jul 2024 12:35:34 +0200 Subject: [PATCH] generate compat code --- generator.py | 61 ++++++++-- .../resources/assets/rounded/lang/en_us.json | 3 - .../java/com/lumiscosity/rounded/Rounded.java | 24 +++- .../rounded/compat/BetterEndCompat.java | 22 ---- .../rounded/compat/BetterendCompat.java | 84 ++++++++++++++ .../rounded/compat/BetternetherCompat.java | 77 +++++++++++++ .../rounded/compat/BiomesoplentyCompat.java | 105 ++++++++++++++++++ .../rounded/compat/CinderscapesCompat.java | 28 +++++ .../rounded/compat/TerrestriaCompat.java | 77 +++++++++++++ .../rounded/compat/TraverseCompat.java | 21 ++++ .../rounded/compat/WilderWildCompat.java | 34 ------ .../rounded/compat/WilderwildCompat.java | 35 ++++++ 12 files changed, 500 insertions(+), 71 deletions(-) delete mode 100644 src/main/java/com/lumiscosity/rounded/compat/BetterEndCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/BetterendCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/BetternetherCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/BiomesoplentyCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/CinderscapesCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/TerrestriaCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/TraverseCompat.java delete mode 100644 src/main/java/com/lumiscosity/rounded/compat/WilderWildCompat.java create mode 100644 src/main/java/com/lumiscosity/rounded/compat/WilderwildCompat.java diff --git a/generator.py b/generator.py index 9b61846..781773a 100644 --- a/generator.py +++ b/generator.py @@ -158,14 +158,14 @@ def add_treated_plank(m, n): # item tag file = JsonFile(source_path="src/main/resources/data/rounded/tags/item/treated_planks.json").data - print(file) - file["values"].append( - { - "required": False, - "id": f"rounded:compat/{m}/{t}" - } - ) - JsonFile(file).dump(origin="./", path="src/main/resources/data/rounded/tags/item/treated_planks.json") + tag = { + "required": False, + "id": f"rounded:compat/{m}/{t}" + } + + if tag not in file["values"]: + file["values"].append(tag) + JsonFile(file).dump(origin="./", path="src/main/resources/data/rounded/tags/item/treated_planks.json") # blockstate file = { @@ -200,6 +200,49 @@ def add_treated_plank(m, n): JsonFile(file).dump(origin="./", path="src/client/resources/assets/rounded/lang/en_us.json") +def add_treated_plank_code(m, l): + module_name = m.replace("_", " ").title().replace(" ", "") + "Compat" + file = """package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class {} {{""".format(module_name) + + for i in l: + p = f"{i}_planks" + t = f"treated_{p}" + + file += f""" + public static final Block {t.upper()} = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("{m}", "{p}"))) + ); + public static final Item {t.upper()}_ITEM = new BlockItem({t.upper()}, new Item.Settings()); + + """ + + file += " public static void register() {" + + for i in l: + t = f"treated_{i}_planks" + + file += f' register_treated_plank("compat/{m}/{t}", {t.upper()}, {t.upper()}_ITEM, "{m}", "{i}");\n' + + file += """ + } + }""" + + module = open(f"src/main/java/com/lumiscosity/rounded/compat/{module_name}.java", "w") + module.write(file) + module.close() + for i in compat_generated.keys(): + add_treated_plank_code(i, compat_generated[i]) for j in compat_generated[i]: - add_treated_plank(i, j) + add_treated_plank(i, j) \ No newline at end of file diff --git a/src/client/resources/assets/rounded/lang/en_us.json b/src/client/resources/assets/rounded/lang/en_us.json index 02a7ee6..4da7a07 100644 --- a/src/client/resources/assets/rounded/lang/en_us.json +++ b/src/client/resources/assets/rounded/lang/en_us.json @@ -14,11 +14,9 @@ "block.rounded.lustershroom_block": "Lustershroom Block", "block.rounded.luster_cluster": "Luster Cluster", "block.rounded.trough": "Trough", - "subtitles.rounded.block.trough_fill": "Trough filled", "subtitles.rounded.block.trough_consume": "Trough consumed", "subtitles.rounded.block.trough_rustle": "Feed rustles", - "tag.worldgen.biome.rounded.has_lustershrooms": "Has Lustershrooms", "tag.worldgen.biome.rounded.has_more_lustershrooms": "Has more Lustershrooms", "tag.item.rounded.trough_feed": "Trough Feed", @@ -26,7 +24,6 @@ "tag.item.c.grain": "Grain", "tag.item.c.mushrooms": "Mushrooms", "tag.item.c.mushroom_caps": "Mushroom Caps", - "block.rounded.compat.treated_hevea_brasiliensis_planks": "Treated Hevea Brasiliensis Planks", "block.rounded.compat.betterend.treated_dragon_tree_planks": "Treated Dragon Tree Planks", "block.rounded.compat.betterend.treated_end_lotus_planks": "Treated End Lotus Planks", diff --git a/src/main/java/com/lumiscosity/rounded/Rounded.java b/src/main/java/com/lumiscosity/rounded/Rounded.java index e2aad46..8ecc777 100644 --- a/src/main/java/com/lumiscosity/rounded/Rounded.java +++ b/src/main/java/com/lumiscosity/rounded/Rounded.java @@ -1,8 +1,7 @@ package com.lumiscosity.rounded; import com.lumiscosity.rounded.blocks.RegisterBlocks; -import com.lumiscosity.rounded.compat.ExtravaganzaCompat; -import com.lumiscosity.rounded.compat.WilderWildCompat; +import com.lumiscosity.rounded.compat.*; import com.lumiscosity.rounded.misc.RegisterSounds; import com.lumiscosity.rounded.misc.RegisterTrades; import net.fabricmc.api.ModInitializer; @@ -24,8 +23,27 @@ public void onInitialize() { if (FabricLoader.getInstance().isModLoaded("extravaganza")) { ExtravaganzaCompat.register(); } + + if (FabricLoader.getInstance().isModLoaded("betterend")) { + BetterendCompat.register(); + } + if (FabricLoader.getInstance().isModLoaded("betternether")) { + BetternetherCompat.register(); + } + if (FabricLoader.getInstance().isModLoaded("biomesoplenty")) { + BiomesoplentyCompat.register(); + } + if (FabricLoader.getInstance().isModLoaded("cinderscapes")) { + CinderscapesCompat.register(); + } + if (FabricLoader.getInstance().isModLoaded("terrestria")) { + TerrestriaCompat.register(); + } + if (FabricLoader.getInstance().isModLoaded("traverse")) { + TraverseCompat.register(); + } if (FabricLoader.getInstance().isModLoaded("wilderwild")) { - WilderWildCompat.register(); + WilderwildCompat.register(); } LOGGER.info("Rounded init complete!"); diff --git a/src/main/java/com/lumiscosity/rounded/compat/BetterEndCompat.java b/src/main/java/com/lumiscosity/rounded/compat/BetterEndCompat.java deleted file mode 100644 index bb342a2..0000000 --- a/src/main/java/com/lumiscosity/rounded/compat/BetterEndCompat.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.lumiscosity.rounded.compat; - -import net.minecraft.block.AbstractBlock; -import net.minecraft.block.Block; -import net.minecraft.block.enums.NoteBlockInstrument; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.sound.BlockSoundGroup; - -import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; - -public class BetterEndCompat { - public static final Block TREATED_HEVEA_BRASILIENSIS_PLANKS = new Block( - AbstractBlock.Settings.create().strength(2.0f).sounds(BlockSoundGroup.WOOD).burnable().instrument(NoteBlockInstrument.BASS) - ); - public static final Item TREATED_HEVEA_BRASILIENSIS_PLANKS_ITEM = new BlockItem(TREATED_HEVEA_BRASILIENSIS_PLANKS, new Item.Settings()); - - public static void register() { - register_treated_plank("compat/treated_hevea_brasiliensis_planks", TREATED_HEVEA_BRASILIENSIS_PLANKS, TREATED_HEVEA_BRASILIENSIS_PLANKS_ITEM, "extravaganza", "hevea_brasiliensis"); - - } -} diff --git a/src/main/java/com/lumiscosity/rounded/compat/BetterendCompat.java b/src/main/java/com/lumiscosity/rounded/compat/BetterendCompat.java new file mode 100644 index 0000000..2336f2b --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/BetterendCompat.java @@ -0,0 +1,84 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class BetterendCompat { + public static final Block TREATED_DRAGON_TREE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "dragon_tree_planks"))) + ); + public static final Item TREATED_DRAGON_TREE_PLANKS_ITEM = new BlockItem(TREATED_DRAGON_TREE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_END_LOTUS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "end_lotus_planks"))) + ); + public static final Item TREATED_END_LOTUS_PLANKS_ITEM = new BlockItem(TREATED_END_LOTUS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_HELIX_TREE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "helix_tree_planks"))) + ); + public static final Item TREATED_HELIX_TREE_PLANKS_ITEM = new BlockItem(TREATED_HELIX_TREE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_JELLYSHROOM_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "jellyshroom_planks"))) + ); + public static final Item TREATED_JELLYSHROOM_PLANKS_ITEM = new BlockItem(TREATED_JELLYSHROOM_PLANKS, new Item.Settings()); + + + public static final Block TREATED_LACUGROVE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "lacugrove_planks"))) + ); + public static final Item TREATED_LACUGROVE_PLANKS_ITEM = new BlockItem(TREATED_LACUGROVE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_LUCERNIA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "lucernia_planks"))) + ); + public static final Item TREATED_LUCERNIA_PLANKS_ITEM = new BlockItem(TREATED_LUCERNIA_PLANKS, new Item.Settings()); + + + public static final Block TREATED_MOSSY_GLOWSHROOM_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "mossy_glowshroom_planks"))) + ); + public static final Item TREATED_MOSSY_GLOWSHROOM_PLANKS_ITEM = new BlockItem(TREATED_MOSSY_GLOWSHROOM_PLANKS, new Item.Settings()); + + + public static final Block TREATED_PYTHADENDRON_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "pythadendron_planks"))) + ); + public static final Item TREATED_PYTHADENDRON_PLANKS_ITEM = new BlockItem(TREATED_PYTHADENDRON_PLANKS, new Item.Settings()); + + + public static final Block TREATED_TENANEA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "tenanea_planks"))) + ); + public static final Item TREATED_TENANEA_PLANKS_ITEM = new BlockItem(TREATED_TENANEA_PLANKS, new Item.Settings()); + + + public static final Block TREATED_UMBRELLA_TREE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betterend", "umbrella_tree_planks"))) + ); + public static final Item TREATED_UMBRELLA_TREE_PLANKS_ITEM = new BlockItem(TREATED_UMBRELLA_TREE_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/betterend/treated_dragon_tree_planks", TREATED_DRAGON_TREE_PLANKS, TREATED_DRAGON_TREE_PLANKS_ITEM, "betterend", "dragon_tree"); + register_treated_plank("compat/betterend/treated_end_lotus_planks", TREATED_END_LOTUS_PLANKS, TREATED_END_LOTUS_PLANKS_ITEM, "betterend", "end_lotus"); + register_treated_plank("compat/betterend/treated_helix_tree_planks", TREATED_HELIX_TREE_PLANKS, TREATED_HELIX_TREE_PLANKS_ITEM, "betterend", "helix_tree"); + register_treated_plank("compat/betterend/treated_jellyshroom_planks", TREATED_JELLYSHROOM_PLANKS, TREATED_JELLYSHROOM_PLANKS_ITEM, "betterend", "jellyshroom"); + register_treated_plank("compat/betterend/treated_lacugrove_planks", TREATED_LACUGROVE_PLANKS, TREATED_LACUGROVE_PLANKS_ITEM, "betterend", "lacugrove"); + register_treated_plank("compat/betterend/treated_lucernia_planks", TREATED_LUCERNIA_PLANKS, TREATED_LUCERNIA_PLANKS_ITEM, "betterend", "lucernia"); + register_treated_plank("compat/betterend/treated_mossy_glowshroom_planks", TREATED_MOSSY_GLOWSHROOM_PLANKS, TREATED_MOSSY_GLOWSHROOM_PLANKS_ITEM, "betterend", "mossy_glowshroom"); + register_treated_plank("compat/betterend/treated_pythadendron_planks", TREATED_PYTHADENDRON_PLANKS, TREATED_PYTHADENDRON_PLANKS_ITEM, "betterend", "pythadendron"); + register_treated_plank("compat/betterend/treated_tenanea_planks", TREATED_TENANEA_PLANKS, TREATED_TENANEA_PLANKS_ITEM, "betterend", "tenanea"); + register_treated_plank("compat/betterend/treated_umbrella_tree_planks", TREATED_UMBRELLA_TREE_PLANKS, TREATED_UMBRELLA_TREE_PLANKS_ITEM, "betterend", "umbrella_tree"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/BetternetherCompat.java b/src/main/java/com/lumiscosity/rounded/compat/BetternetherCompat.java new file mode 100644 index 0000000..8d42aa7 --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/BetternetherCompat.java @@ -0,0 +1,77 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class BetternetherCompat { + public static final Block TREATED_ANCHOR_TREE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "anchor_tree_planks"))) + ); + public static final Item TREATED_ANCHOR_TREE_PLANKS_ITEM = new BlockItem(TREATED_ANCHOR_TREE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_MUSHROOM_FIR_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "mushroom_fir_planks"))) + ); + public static final Item TREATED_MUSHROOM_FIR_PLANKS_ITEM = new BlockItem(TREATED_MUSHROOM_FIR_PLANKS, new Item.Settings()); + + + public static final Block TREATED_NETHER_MUSHROOM_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "nether_mushroom_planks"))) + ); + public static final Item TREATED_NETHER_MUSHROOM_PLANKS_ITEM = new BlockItem(TREATED_NETHER_MUSHROOM_PLANKS, new Item.Settings()); + + + public static final Block TREATED_NETHER_REED_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "nether_reed_planks"))) + ); + public static final Item TREATED_NETHER_REED_PLANKS_ITEM = new BlockItem(TREATED_NETHER_REED_PLANKS, new Item.Settings()); + + + public static final Block TREATED_NETHER_SAKURA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "nether_sakura_planks"))) + ); + public static final Item TREATED_NETHER_SAKURA_PLANKS_ITEM = new BlockItem(TREATED_NETHER_SAKURA_PLANKS, new Item.Settings()); + + + public static final Block TREATED_RUBEUS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "rubeus_planks"))) + ); + public static final Item TREATED_RUBEUS_PLANKS_ITEM = new BlockItem(TREATED_RUBEUS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_STALAGNATE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "stalagnate_planks"))) + ); + public static final Item TREATED_STALAGNATE_PLANKS_ITEM = new BlockItem(TREATED_STALAGNATE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_WART_PLANKS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "wart_planks_planks"))) + ); + public static final Item TREATED_WART_PLANKS_PLANKS_ITEM = new BlockItem(TREATED_WART_PLANKS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_WILLOW_PLANKS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("betternether", "willow_planks_planks"))) + ); + public static final Item TREATED_WILLOW_PLANKS_PLANKS_ITEM = new BlockItem(TREATED_WILLOW_PLANKS_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/betternether/treated_anchor_tree_planks", TREATED_ANCHOR_TREE_PLANKS, TREATED_ANCHOR_TREE_PLANKS_ITEM, "betternether", "anchor_tree"); + register_treated_plank("compat/betternether/treated_mushroom_fir_planks", TREATED_MUSHROOM_FIR_PLANKS, TREATED_MUSHROOM_FIR_PLANKS_ITEM, "betternether", "mushroom_fir"); + register_treated_plank("compat/betternether/treated_nether_mushroom_planks", TREATED_NETHER_MUSHROOM_PLANKS, TREATED_NETHER_MUSHROOM_PLANKS_ITEM, "betternether", "nether_mushroom"); + register_treated_plank("compat/betternether/treated_nether_reed_planks", TREATED_NETHER_REED_PLANKS, TREATED_NETHER_REED_PLANKS_ITEM, "betternether", "nether_reed"); + register_treated_plank("compat/betternether/treated_nether_sakura_planks", TREATED_NETHER_SAKURA_PLANKS, TREATED_NETHER_SAKURA_PLANKS_ITEM, "betternether", "nether_sakura"); + register_treated_plank("compat/betternether/treated_rubeus_planks", TREATED_RUBEUS_PLANKS, TREATED_RUBEUS_PLANKS_ITEM, "betternether", "rubeus"); + register_treated_plank("compat/betternether/treated_stalagnate_planks", TREATED_STALAGNATE_PLANKS, TREATED_STALAGNATE_PLANKS_ITEM, "betternether", "stalagnate"); + register_treated_plank("compat/betternether/treated_wart_planks_planks", TREATED_WART_PLANKS_PLANKS, TREATED_WART_PLANKS_PLANKS_ITEM, "betternether", "wart_planks"); + register_treated_plank("compat/betternether/treated_willow_planks_planks", TREATED_WILLOW_PLANKS_PLANKS, TREATED_WILLOW_PLANKS_PLANKS_ITEM, "betternether", "willow_planks"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/BiomesoplentyCompat.java b/src/main/java/com/lumiscosity/rounded/compat/BiomesoplentyCompat.java new file mode 100644 index 0000000..803e6e1 --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/BiomesoplentyCompat.java @@ -0,0 +1,105 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class BiomesoplentyCompat { + public static final Block TREATED_DEAD_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "dead_planks"))) + ); + public static final Item TREATED_DEAD_PLANKS_ITEM = new BlockItem(TREATED_DEAD_PLANKS, new Item.Settings()); + + + public static final Block TREATED_EMPYREAL_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "empyreal_planks"))) + ); + public static final Item TREATED_EMPYREAL_PLANKS_ITEM = new BlockItem(TREATED_EMPYREAL_PLANKS, new Item.Settings()); + + + public static final Block TREATED_FIR_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "fir_planks"))) + ); + public static final Item TREATED_FIR_PLANKS_ITEM = new BlockItem(TREATED_FIR_PLANKS, new Item.Settings()); + + + public static final Block TREATED_HELLBARK_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "hellbark_planks"))) + ); + public static final Item TREATED_HELLBARK_PLANKS_ITEM = new BlockItem(TREATED_HELLBARK_PLANKS, new Item.Settings()); + + + public static final Block TREATED_JACARANDA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "jacaranda_planks"))) + ); + public static final Item TREATED_JACARANDA_PLANKS_ITEM = new BlockItem(TREATED_JACARANDA_PLANKS, new Item.Settings()); + + + public static final Block TREATED_MAGIC_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "magic_planks"))) + ); + public static final Item TREATED_MAGIC_PLANKS_ITEM = new BlockItem(TREATED_MAGIC_PLANKS, new Item.Settings()); + + + public static final Block TREATED_MAHOGANY_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "mahogany_planks"))) + ); + public static final Item TREATED_MAHOGANY_PLANKS_ITEM = new BlockItem(TREATED_MAHOGANY_PLANKS, new Item.Settings()); + + + public static final Block TREATED_MAPLE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "maple_planks"))) + ); + public static final Item TREATED_MAPLE_PLANKS_ITEM = new BlockItem(TREATED_MAPLE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_PALM_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "palm_planks"))) + ); + public static final Item TREATED_PALM_PLANKS_ITEM = new BlockItem(TREATED_PALM_PLANKS, new Item.Settings()); + + + public static final Block TREATED_PINE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "pine_planks"))) + ); + public static final Item TREATED_PINE_PLANKS_ITEM = new BlockItem(TREATED_PINE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_REDWOOD_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "redwood_planks"))) + ); + public static final Item TREATED_REDWOOD_PLANKS_ITEM = new BlockItem(TREATED_REDWOOD_PLANKS, new Item.Settings()); + + + public static final Block TREATED_UMBRAN_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "umbran_planks"))) + ); + public static final Item TREATED_UMBRAN_PLANKS_ITEM = new BlockItem(TREATED_UMBRAN_PLANKS, new Item.Settings()); + + + public static final Block TREATED_WILLOW_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("biomesoplenty", "willow_planks"))) + ); + public static final Item TREATED_WILLOW_PLANKS_ITEM = new BlockItem(TREATED_WILLOW_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/biomesoplenty/treated_dead_planks", TREATED_DEAD_PLANKS, TREATED_DEAD_PLANKS_ITEM, "biomesoplenty", "dead"); + register_treated_plank("compat/biomesoplenty/treated_empyreal_planks", TREATED_EMPYREAL_PLANKS, TREATED_EMPYREAL_PLANKS_ITEM, "biomesoplenty", "empyreal"); + register_treated_plank("compat/biomesoplenty/treated_fir_planks", TREATED_FIR_PLANKS, TREATED_FIR_PLANKS_ITEM, "biomesoplenty", "fir"); + register_treated_plank("compat/biomesoplenty/treated_hellbark_planks", TREATED_HELLBARK_PLANKS, TREATED_HELLBARK_PLANKS_ITEM, "biomesoplenty", "hellbark"); + register_treated_plank("compat/biomesoplenty/treated_jacaranda_planks", TREATED_JACARANDA_PLANKS, TREATED_JACARANDA_PLANKS_ITEM, "biomesoplenty", "jacaranda"); + register_treated_plank("compat/biomesoplenty/treated_magic_planks", TREATED_MAGIC_PLANKS, TREATED_MAGIC_PLANKS_ITEM, "biomesoplenty", "magic"); + register_treated_plank("compat/biomesoplenty/treated_mahogany_planks", TREATED_MAHOGANY_PLANKS, TREATED_MAHOGANY_PLANKS_ITEM, "biomesoplenty", "mahogany"); + register_treated_plank("compat/biomesoplenty/treated_maple_planks", TREATED_MAPLE_PLANKS, TREATED_MAPLE_PLANKS_ITEM, "biomesoplenty", "maple"); + register_treated_plank("compat/biomesoplenty/treated_palm_planks", TREATED_PALM_PLANKS, TREATED_PALM_PLANKS_ITEM, "biomesoplenty", "palm"); + register_treated_plank("compat/biomesoplenty/treated_pine_planks", TREATED_PINE_PLANKS, TREATED_PINE_PLANKS_ITEM, "biomesoplenty", "pine"); + register_treated_plank("compat/biomesoplenty/treated_redwood_planks", TREATED_REDWOOD_PLANKS, TREATED_REDWOOD_PLANKS_ITEM, "biomesoplenty", "redwood"); + register_treated_plank("compat/biomesoplenty/treated_umbran_planks", TREATED_UMBRAN_PLANKS, TREATED_UMBRAN_PLANKS_ITEM, "biomesoplenty", "umbran"); + register_treated_plank("compat/biomesoplenty/treated_willow_planks", TREATED_WILLOW_PLANKS, TREATED_WILLOW_PLANKS_ITEM, "biomesoplenty", "willow"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/CinderscapesCompat.java b/src/main/java/com/lumiscosity/rounded/compat/CinderscapesCompat.java new file mode 100644 index 0000000..b1477a0 --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/CinderscapesCompat.java @@ -0,0 +1,28 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class CinderscapesCompat { + public static final Block TREATED_SCORCHED_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("cinderscapes", "scorched_planks"))) + ); + public static final Item TREATED_SCORCHED_PLANKS_ITEM = new BlockItem(TREATED_SCORCHED_PLANKS, new Item.Settings()); + + + public static final Block TREATED_UMBRAL_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("cinderscapes", "umbral_planks"))) + ); + public static final Item TREATED_UMBRAL_PLANKS_ITEM = new BlockItem(TREATED_UMBRAL_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/cinderscapes/treated_scorched_planks", TREATED_SCORCHED_PLANKS, TREATED_SCORCHED_PLANKS_ITEM, "cinderscapes", "scorched"); + register_treated_plank("compat/cinderscapes/treated_umbral_planks", TREATED_UMBRAL_PLANKS, TREATED_UMBRAL_PLANKS_ITEM, "cinderscapes", "umbral"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/TerrestriaCompat.java b/src/main/java/com/lumiscosity/rounded/compat/TerrestriaCompat.java new file mode 100644 index 0000000..8cd624f --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/TerrestriaCompat.java @@ -0,0 +1,77 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class TerrestriaCompat { + public static final Block TREATED_CYPRESS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "cypress_planks"))) + ); + public static final Item TREATED_CYPRESS_PLANKS_ITEM = new BlockItem(TREATED_CYPRESS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_HEMLOCK_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "hemlock_planks"))) + ); + public static final Item TREATED_HEMLOCK_PLANKS_ITEM = new BlockItem(TREATED_HEMLOCK_PLANKS, new Item.Settings()); + + + public static final Block TREATED_JAPANESE_MAPLE_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "japanese_maple_planks"))) + ); + public static final Item TREATED_JAPANESE_MAPLE_PLANKS_ITEM = new BlockItem(TREATED_JAPANESE_MAPLE_PLANKS, new Item.Settings()); + + + public static final Block TREATED_RAINBOW_EUCALYPTUS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "rainbow_eucalyptus_planks"))) + ); + public static final Item TREATED_RAINBOW_EUCALYPTUS_PLANKS_ITEM = new BlockItem(TREATED_RAINBOW_EUCALYPTUS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_REDWOOD_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "redwood_planks"))) + ); + public static final Item TREATED_REDWOOD_PLANKS_ITEM = new BlockItem(TREATED_REDWOOD_PLANKS, new Item.Settings()); + + + public static final Block TREATED_RUBBER_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "rubber_planks"))) + ); + public static final Item TREATED_RUBBER_PLANKS_ITEM = new BlockItem(TREATED_RUBBER_PLANKS, new Item.Settings()); + + + public static final Block TREATED_SAKURA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "sakura_planks"))) + ); + public static final Item TREATED_SAKURA_PLANKS_ITEM = new BlockItem(TREATED_SAKURA_PLANKS, new Item.Settings()); + + + public static final Block TREATED_WILLOW_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "willow_planks"))) + ); + public static final Item TREATED_WILLOW_PLANKS_ITEM = new BlockItem(TREATED_WILLOW_PLANKS, new Item.Settings()); + + + public static final Block TREATED_YUCCA_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("terrestria", "yucca_planks"))) + ); + public static final Item TREATED_YUCCA_PLANKS_ITEM = new BlockItem(TREATED_YUCCA_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/terrestria/treated_cypress_planks", TREATED_CYPRESS_PLANKS, TREATED_CYPRESS_PLANKS_ITEM, "terrestria", "cypress"); + register_treated_plank("compat/terrestria/treated_hemlock_planks", TREATED_HEMLOCK_PLANKS, TREATED_HEMLOCK_PLANKS_ITEM, "terrestria", "hemlock"); + register_treated_plank("compat/terrestria/treated_japanese_maple_planks", TREATED_JAPANESE_MAPLE_PLANKS, TREATED_JAPANESE_MAPLE_PLANKS_ITEM, "terrestria", "japanese_maple"); + register_treated_plank("compat/terrestria/treated_rainbow_eucalyptus_planks", TREATED_RAINBOW_EUCALYPTUS_PLANKS, TREATED_RAINBOW_EUCALYPTUS_PLANKS_ITEM, "terrestria", "rainbow_eucalyptus"); + register_treated_plank("compat/terrestria/treated_redwood_planks", TREATED_REDWOOD_PLANKS, TREATED_REDWOOD_PLANKS_ITEM, "terrestria", "redwood"); + register_treated_plank("compat/terrestria/treated_rubber_planks", TREATED_RUBBER_PLANKS, TREATED_RUBBER_PLANKS_ITEM, "terrestria", "rubber"); + register_treated_plank("compat/terrestria/treated_sakura_planks", TREATED_SAKURA_PLANKS, TREATED_SAKURA_PLANKS_ITEM, "terrestria", "sakura"); + register_treated_plank("compat/terrestria/treated_willow_planks", TREATED_WILLOW_PLANKS, TREATED_WILLOW_PLANKS_ITEM, "terrestria", "willow"); + register_treated_plank("compat/terrestria/treated_yucca_planks", TREATED_YUCCA_PLANKS, TREATED_YUCCA_PLANKS_ITEM, "terrestria", "yucca"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/TraverseCompat.java b/src/main/java/com/lumiscosity/rounded/compat/TraverseCompat.java new file mode 100644 index 0000000..9ae5b41 --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/TraverseCompat.java @@ -0,0 +1,21 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class TraverseCompat { + public static final Block TREATED_FIR_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("traverse", "fir_planks"))) + ); + public static final Item TREATED_FIR_PLANKS_ITEM = new BlockItem(TREATED_FIR_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/traverse/treated_fir_planks", TREATED_FIR_PLANKS, TREATED_FIR_PLANKS_ITEM, "traverse", "fir"); + + } + } \ No newline at end of file diff --git a/src/main/java/com/lumiscosity/rounded/compat/WilderWildCompat.java b/src/main/java/com/lumiscosity/rounded/compat/WilderWildCompat.java deleted file mode 100644 index 1e48896..0000000 --- a/src/main/java/com/lumiscosity/rounded/compat/WilderWildCompat.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.lumiscosity.rounded.compat; - -import net.minecraft.block.AbstractBlock; -import net.minecraft.block.Block; -import net.minecraft.block.MapColor; -import net.minecraft.block.enums.NoteBlockInstrument; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.sound.BlockSoundGroup; - -import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; - -public class WilderWildCompat { - public static final Block TREATED_BAOBAB_PLANKS = new Block( - AbstractBlock.Settings.create().mapColor(MapColor.ORANGE).instrument(NoteBlockInstrument.BASS).strength(2.0F, 3.0F).sounds(BlockSoundGroup.WOOD).burnable() - ); - public static final Item TREATED_BAOBAB_PLANKS_ITEM = new BlockItem(TREATED_BAOBAB_PLANKS, new Item.Settings()); - - public static final Block TREATED_CYPRESS_PLANKS = new Block( - AbstractBlock.Settings.create().mapColor(MapColor.LIGHT_GRAY).instrument(NoteBlockInstrument.BASS).strength(2.0F, 3.0F).sounds(BlockSoundGroup.WOOD).burnable() - ); - public static final Item TREATED_CYPRESS_PLANKS_ITEM = new BlockItem(TREATED_CYPRESS_PLANKS, new Item.Settings()); - - public static final Block TREATED_PALM_PLANKS = new Block( - AbstractBlock.Settings.create().mapColor(MapColor.TERRACOTTA_WHITE).instrument(NoteBlockInstrument.BASS).strength(2.0F, 3.0F).sounds(BlockSoundGroup.WOOD).burnable() - ); - public static final Item TREATED_PALM_PLANKS_ITEM = new BlockItem(TREATED_PALM_PLANKS, new Item.Settings()); - - public static void register() { - register_treated_plank("compat/wilderwild/treated_baobab_planks", TREATED_BAOBAB_PLANKS, TREATED_BAOBAB_PLANKS_ITEM, "wilderwild", "baobab"); - register_treated_plank("compat/wilderwild/treated_cypress_planks", TREATED_CYPRESS_PLANKS, TREATED_CYPRESS_PLANKS_ITEM, "wilderwild", "cypress"); - register_treated_plank("compat/wilderwild/treated_palm_planks", TREATED_PALM_PLANKS, TREATED_PALM_PLANKS_ITEM, "wilderwild", "palm"); - } -} diff --git a/src/main/java/com/lumiscosity/rounded/compat/WilderwildCompat.java b/src/main/java/com/lumiscosity/rounded/compat/WilderwildCompat.java new file mode 100644 index 0000000..360c10a --- /dev/null +++ b/src/main/java/com/lumiscosity/rounded/compat/WilderwildCompat.java @@ -0,0 +1,35 @@ +package com.lumiscosity.rounded.compat; + + import net.minecraft.block.AbstractBlock; + import net.minecraft.block.Block; + import net.minecraft.item.BlockItem; + import net.minecraft.item.Item; + import net.minecraft.registry.Registries; + import net.minecraft.util.Identifier; + + import static com.lumiscosity.rounded.blocks.RegisterBlocks.register_treated_plank; + + public class WilderwildCompat { + public static final Block TREATED_BAOBAB_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("wilderwild", "baobab_planks"))) + ); + public static final Item TREATED_BAOBAB_PLANKS_ITEM = new BlockItem(TREATED_BAOBAB_PLANKS, new Item.Settings()); + + + public static final Block TREATED_CYPRESS_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("wilderwild", "cypress_planks"))) + ); + public static final Item TREATED_CYPRESS_PLANKS_ITEM = new BlockItem(TREATED_CYPRESS_PLANKS, new Item.Settings()); + + + public static final Block TREATED_PALM_PLANKS = new Block( + AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("wilderwild", "palm_planks"))) + ); + public static final Item TREATED_PALM_PLANKS_ITEM = new BlockItem(TREATED_PALM_PLANKS, new Item.Settings()); + + public static void register() { register_treated_plank("compat/wilderwild/treated_baobab_planks", TREATED_BAOBAB_PLANKS, TREATED_BAOBAB_PLANKS_ITEM, "wilderwild", "baobab"); + register_treated_plank("compat/wilderwild/treated_cypress_planks", TREATED_CYPRESS_PLANKS, TREATED_CYPRESS_PLANKS_ITEM, "wilderwild", "cypress"); + register_treated_plank("compat/wilderwild/treated_palm_planks", TREATED_PALM_PLANKS, TREATED_PALM_PLANKS_ITEM, "wilderwild", "palm"); + + } + } \ No newline at end of file