diff --git a/common/src/main/java/cc/cassian/pyrite/Pyrite.java b/common/src/main/java/cc/cassian/pyrite/Pyrite.java index 9a424d9c9..61a99c611 100644 --- a/common/src/main/java/cc/cassian/pyrite/Pyrite.java +++ b/common/src/main/java/cc/cassian/pyrite/Pyrite.java @@ -15,48 +15,48 @@ public class Pyrite { public static final Logger LOGGER = LogManager.getLogger(modID); - public static void init(String platform) { + public static void init() { //Framed Glass - createPyriteBlock("framed_glass","glass", 2.0f, MapColor.CLEAR, 0, platform); + createPyriteBlock("framed_glass","glass", 2.0f, MapColor.CLEAR, 0); //Framed Glass Pane - createPyriteBlock( "framed_glass_pane","glass_pane", 2.0f, MapColor.CLEAR, 0, platform); + createPyriteBlock( "framed_glass_pane","glass_pane", 2.0f, MapColor.CLEAR, 0); //Cobblestone Bricks - generateBrickSet("cobblestone_brick", Blocks.COBBLESTONE, MapColor.STONE_GRAY, 0, platform); + generateBrickSet("cobblestone_brick", Blocks.COBBLESTONE, MapColor.STONE_GRAY, 0); //Mossy Cobblestone Bricks - generateBrickSet("mossy_cobblestone_brick", Blocks.MOSSY_COBBLESTONE, MapColor.STONE_GRAY, 0, platform); - generateBrickSet("smooth_stone_brick", Blocks.COBBLESTONE, MapColor.STONE_GRAY, 0, platform); + generateBrickSet("mossy_cobblestone_brick", Blocks.MOSSY_COBBLESTONE, MapColor.STONE_GRAY, 0); + generateBrickSet("smooth_stone_brick", Blocks.COBBLESTONE, MapColor.STONE_GRAY, 0); //Grass Set - createTurfSets(platform); + createTurfSets(); //Nether Brick Fence Gate - createPyriteBlock("nether_brick_fence_gate","fence_gate", Blocks.NETHER_BRICK_FENCE, platform); + createPyriteBlock("nether_brick_fence_gate","fence_gate", Blocks.NETHER_BRICK_FENCE); //Resource Blocks - generateResourceBlocks(platform); + generateResourceBlocks(); //Torch Levers - createTorchLever("torch_lever", Blocks.TORCH, ParticleTypes.FLAME, platform); - createTorchLever("redstone_torch_lever", Blocks.SOUL_TORCH, DustParticleEffect.DEFAULT, platform); - createTorchLever("soul_torch_lever", Blocks.TORCH, ParticleTypes.SOUL_FIRE_FLAME, platform); + createTorchLever("torch_lever", Blocks.TORCH, ParticleTypes.FLAME); + createTorchLever("redstone_torch_lever", Blocks.SOUL_TORCH, DustParticleEffect.DEFAULT); + createTorchLever("soul_torch_lever", Blocks.TORCH, ParticleTypes.SOUL_FIRE_FLAME); //Lamps - createPyriteBlock("lit_redstone_lamp", "block", Blocks.REDSTONE_LAMP, 15, platform); - createPyriteBlock("glowstone_lamp","block", 0.3f, MapColor.YELLOW, 15, platform); + createPyriteBlock("lit_redstone_lamp", "block", Blocks.REDSTONE_LAMP, 15); + createPyriteBlock("glowstone_lamp","block", 0.3f, MapColor.YELLOW, 15); //Classic Features - createPyriteBlock("glowing_obsidian","obsidian", 50f, MapColor.RED, 15, platform); - createPyriteBlock("nostalgia_glowing_obsidian","obsidian", 50f, MapColor.RED, 15, platform); - createPyriteBlock("locked_chest", "facing", Blocks.CHEST, 15, platform); - createNostalgia(platform); + createPyriteBlock("glowing_obsidian","obsidian", 50f, MapColor.RED, 15); + createPyriteBlock("nostalgia_glowing_obsidian","obsidian", 50f, MapColor.RED, 15); + createPyriteBlock("locked_chest", "facing", Blocks.CHEST, 15); + createNostalgia(); //Classic Flowers - createFlowers(platform); + createFlowers(); //Charred Nether Bricks - generateBrickSet("charred_nether_brick", Blocks.NETHER_BRICKS, MapColor.BLACK, 0, platform); + generateBrickSet("charred_nether_brick", Blocks.NETHER_BRICKS, MapColor.BLACK, 0); //Blue Nether Bricks - generateBrickSet("blue_nether_brick", Blocks.NETHER_BRICKS, MapColor.BLUE, 0, platform); + generateBrickSet("blue_nether_brick", Blocks.NETHER_BRICKS, MapColor.BLUE, 0); //Vanilla Crafting Tables - generateVanillaCraftingTables(platform); + generateVanillaCraftingTables(); //Red Mushroom Blocks - createPyriteBlock("red_mushroom_stem", "log", Blocks.MUSHROOM_STEM, platform); - createWoodSet("red_mushroom", MapColor.RED, 0, platform); + createPyriteBlock("red_mushroom_stem", "log", Blocks.MUSHROOM_STEM); + createWoodSet("red_mushroom", MapColor.RED, 0); //Brown Mushroom Blocks - createPyriteBlock("brown_mushroom_stem", "log", Blocks.MUSHROOM_STEM, platform); - createWoodSet("brown_mushroom", MapColor.BROWN, 0, platform); + createPyriteBlock("brown_mushroom_stem", "log", Blocks.MUSHROOM_STEM); + createWoodSet("brown_mushroom", MapColor.BROWN, 0); //Autogenerate dye blocks. final String[] dyes = getDyes(); for (int dyeIndex = 0; dyeIndex < dyes.length; dyeIndex++) { @@ -67,9 +67,9 @@ public static void init(String platform) { //Dye items. registerPyriteItem(dye + "_dye"); //Dyed Wool - createPyriteBlock(dye + "_wool", "block", Blocks.WHITE_WOOL, color, blockLux, platform); + createPyriteBlock(dye + "_wool", "block", Blocks.WHITE_WOOL, color, blockLux); //Terracotta Block - createPyriteBlock(dye+"_terracotta", "block", Blocks.TERRACOTTA,color, blockLux, platform); + createPyriteBlock(dye+"_terracotta", "block", Blocks.TERRACOTTA,color, blockLux); //Glazed Terracotta Block //coming soon - createPyriteBlock(dye+"_glazed_terracotta", "block", Blocks.TERRACOTTA,color, blockLux); @@ -78,24 +78,24 @@ public static void init(String platform) { //Concrete Block //coming soon - createPyriteBlock(dye+"_concrete", "block", Blocks.CONCRETE,color, blockLux); //Carpet block - createPyriteBlock(dye + "_carpet", "carpet", Blocks.WHITE_CARPET, color, blockLux, platform); + createPyriteBlock(dye + "_carpet", "carpet", Blocks.WHITE_CARPET, color, blockLux); } //Planks and plank products - createWoodSet(dye + "_stained", color, blockLux, platform); + createWoodSet(dye + "_stained", color, blockLux); //Bricks and brick products - generateBrickSet(dye + "_brick", Blocks.BRICKS, color, blockLux, platform); + generateBrickSet(dye + "_brick", Blocks.BRICKS, color, blockLux); //Terracotta Bricks - generateBrickSet(dye+"_terracotta_brick", Blocks.TERRACOTTA, color, blockLux, platform); + generateBrickSet(dye+"_terracotta_brick", Blocks.TERRACOTTA, color, blockLux); //Dyed Framed Glass - createPyriteBlock(dye+"_framed_glass","tinted_glass", 2.0f, color, blockLux, platform); + createPyriteBlock(dye+"_framed_glass","tinted_glass", 2.0f, color, blockLux); //Dyed Framed Glass Pane - createPyriteBlock( dye+"_framed_glass_pane","tinted_glass_pane", 2.0f, color, blockLux, platform); + createPyriteBlock( dye+"_framed_glass_pane","tinted_glass_pane", 2.0f, color, blockLux); //Dyed Lamps - createPyriteBlock(dye + "_lamp","block", 0.3f, color, 15, platform); + createPyriteBlock(dye + "_lamp","block", 0.3f, color, 15); //Dyed Torches - createTorch(dye+"_torch", getTorchParticle(dye), platform); + createTorch(dye+"_torch", getTorchParticle(dye)); //Dyed Torch Levers - createTorchLever(dye+"_torch_lever", Blocks.TORCH, getTorchParticle(dye), platform); + createTorchLever(dye+"_torch_lever", Blocks.TORCH, getTorchParticle(dye)); @@ -109,7 +109,7 @@ public static void init(String platform) { block = block + "_wall"; } //Create block. - createPyriteBlock(block + "_gate","fence_gate", wallsBlock, platform); + createPyriteBlock(block + "_gate","fence_gate", wallsBlock); } register(); diff --git a/common/src/main/java/cc/cassian/pyrite/functions/BlockCreator.java b/common/src/main/java/cc/cassian/pyrite/functions/BlockCreator.java index 08e2443a5..65ff406cf 100644 --- a/common/src/main/java/cc/cassian/pyrite/functions/BlockCreator.java +++ b/common/src/main/java/cc/cassian/pyrite/functions/BlockCreator.java @@ -34,25 +34,25 @@ public static void register() { throw new AssertionError(); } - public static void generateResourceBlocks(String platform) { + public static void generateResourceBlocks() { for (Block resourceBlock : resource_blocks) { String block = findVanillaBlockID(resourceBlock); //If the block provided isn't a wall block, add the wall tag. if (block.contains("block")) { block = block.substring(0, block.indexOf("_block")); } - createResourceBlockSet(block, resourceBlock, platform); + createResourceBlockSet(block, resourceBlock); } } - public static void createTorchLever(String blockID, Block baseTorch, ParticleEffect particle, String platform) { - sendToRegistry(blockID, "torch_lever", AbstractBlock.Settings.copy(baseTorch), particle, platform); + public static void createTorchLever(String blockID, Block baseTorch, ParticleEffect particle) { + sendToRegistry(blockID, "torch_lever", AbstractBlock.Settings.copy(baseTorch), particle); } - public static void createTorch(String blockID, ParticleEffect particle, String platform) { - sendToRegistry(blockID, "torch", AbstractBlock.Settings.copy(Blocks.TORCH), particle, platform); + public static void createTorch(String blockID, ParticleEffect particle) { + sendToRegistry(blockID, "torch", AbstractBlock.Settings.copy(Blocks.TORCH), particle); } - public static void generateVanillaCraftingTables(String platform) { + public static void generateVanillaCraftingTables() { //Autogenerate Vanilla Crafting Tables for (Block plankBlock : vanillaWood) { //Find block ID @@ -62,244 +62,229 @@ public static void generateVanillaCraftingTables(String platform) { block = block.substring(0, block.indexOf("_planks")); } //Create block. - createPyriteBlock(block + "_crafting_table","crafting", plankBlock, platform); + createPyriteBlock(block + "_crafting_table","crafting", plankBlock); } } //Primarily used for Framed Glass, Glowstone/Dyed Lamps, Glowing Obsidian - public static void createPyriteBlock(String blockID, String blockType, Float strength, MapColor color, int lightLevel, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Float strength, MapColor color, int lightLevel) { AbstractBlock.Settings settings = AbstractBlock.Settings.create().strength(strength).luminance(state -> lightLevel).mapColor(color); if (Objects.equals(blockType, "obsidian")) { - sendToRegistry(blockID, "block", settings.strength(strength, 1200f).pistonBehavior(PistonBehavior.BLOCK), platform); + sendToRegistry(blockID, "block", settings.strength(strength, 1200f).pistonBehavior(PistonBehavior.BLOCK)); } else { - sendToRegistry(blockID, blockType, settings, platform); + sendToRegistry(blockID, blockType, settings); } } //Create and then add carpets - private static void createCarpet(String blockID, String platform) { + private static void createCarpet(String blockID) { AbstractBlock.Settings blockSettings = copyBlock(Blocks.MOSS_CARPET); - sendToRegistry(blockID, "carpet", blockSettings, platform); + sendToRegistry(blockID, "carpet", blockSettings); } //Create and then add most of the manually generated blocks. - public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Block copyBlock) { platfomRegister(blockID, blockType, copyBlock(copyBlock), WoodType.CRIMSON, BlockSetType.IRON, null, copyBlock); } //Create a slab from the last block added. - public static void createStair(String blockID, Block copyBlock, String platform) { + public static void createStair(String blockID, Block copyBlock) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock); - sendToRegistry(blockID+"_stairs", copyBlock, blockSettings, platform); + sendToRegistry(blockID+"_stairs", copyBlock, blockSettings); } //Create a slab from the last block added. - public static void createSlab(String blockID, Block copyBlock, String platform) { + public static void createSlab(String blockID, Block copyBlock) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock); - sendToRegistry(blockID+"_slab", "slab", blockSettings, platform); + sendToRegistry(blockID+"_slab", "slab", blockSettings); } //Create blocks that require a change in light level, e.g. Locked Chests - public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, int lux, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, int lux) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock).luminance(parseLux(lux)); platfomRegister(blockID, blockType, blockSettings, null, null, null, null); } - private static void sendToRegistry(String blockID, String blockType, AbstractBlock.Settings blockSettings, String platform) { + private static void sendToRegistry(String blockID, String blockType, AbstractBlock.Settings blockSettings) { platfomRegister(blockID, blockType, blockSettings, null, null, null, null); } - private static void sendToRegistry(String blockID, Block copyBlock, AbstractBlock.Settings blockSettings, String platform) { + private static void sendToRegistry(String blockID, Block copyBlock, AbstractBlock.Settings blockSettings) { platfomRegister(blockID, "stairs", blockSettings, null, null, null, copyBlock); } //Add blocks with particles - Torches/Torch Levers - private static void sendToRegistry(String blockID, String blockType, AbstractBlock.Settings blockSettings, ParticleEffect particle, String platform) { + private static void sendToRegistry(String blockID, String blockType, AbstractBlock.Settings blockSettings, ParticleEffect particle) { platfomRegister(blockID, blockType, blockSettings, null, null, particle, null); } //Create blocks that require a Block Set. - public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, BlockSetType set, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, BlockSetType set) { platfomRegister(blockID, blockType, copyBlock(copyBlock), null, set, null, null); } //Create most of the generic Stained Blocks, then add them. - public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, MapColor color, int lux, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, MapColor color, int lux) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock).mapColor(color).luminance(parseLux(lux)); platfomRegister(blockID, blockType, blockSettings, null, null, null, copyBlock); } //Create basic blocks. - public static void createPyriteBlock(String blockID, Block copyBlock, String platform) { + public static void createPyriteBlock(String blockID, Block copyBlock) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock); platfomRegister(blockID, "block", blockSettings, null, null, null, null); } //Create Stained blocks that require a wood set or wood type, then add them. - public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, MapColor color, int lux, BlockSetType set, WoodType type, String platform) { + public static void createPyriteBlock(String blockID, String blockType, Block copyBlock, MapColor color, int lux, BlockSetType set, WoodType type) { AbstractBlock.Settings blockSettings = copyBlock(copyBlock).mapColor(color).luminance(parseLux(lux)); platfomRegister(blockID, blockType, blockSettings, type, set, null, null); } - public static void createFlowers(String platform) { + public static void createFlowers() { for (Map.Entry entry : flowers.entrySet()) { - createPyriteBlock(entry.getKey(), "flower", entry.getValue(), platform); + createPyriteBlock(entry.getKey(), "flower", entry.getValue()); } } - public static void createTurfSets(String platform) { + public static void createTurfSets() { for (Map.Entry entry : turfSets.entrySet()) { - createTurfSet(entry.getKey(), entry.getValue(), platform); + createTurfSet(entry.getKey(), entry.getValue()); } } - public static void createNostalgia(String platform) { + public static void createNostalgia() { for (Map.Entry entry : nostalgiaBlocks.entrySet()) { - createPyriteBlock(entry.getKey(), "block", entry.getValue(), platform); + createPyriteBlock(entry.getKey(), "block", entry.getValue()); } - createPyriteBlock("nostalgia_gravel", "gravel", Blocks.GRAVEL, platform); + createPyriteBlock("nostalgia_gravel", "gravel", Blocks.GRAVEL); } //Generate an entire brick set. - public static void generateBrickSet(String blockID, Block copyBlock, MapColor color, int lux, String platform) { + public static void generateBrickSet(String blockID, Block copyBlock, MapColor color, int lux) { //Bricks - createPyriteBlock( blockID+"s", "block", copyBlock, color, lux, platform); + createPyriteBlock( blockID+"s", "block", copyBlock, color, lux); //Brick Stairs - createPyriteBlock( blockID+"_stairs", "stairs", copyBlock, color, lux, platform); + createPyriteBlock( blockID+"_stairs", "stairs", copyBlock, color, lux); //Brick Slab - createPyriteBlock( blockID+"_slab", "slab", copyBlock, color, lux, platform); + createPyriteBlock( blockID+"_slab", "slab", copyBlock, color, lux); //Brick Wall - createPyriteBlock( blockID+"_wall", "wall", copyBlock, color, lux, platform); + createPyriteBlock( blockID+"_wall", "wall", copyBlock, color, lux); //Brick Wall Gate - createPyriteBlock(blockID+"_wall_gate","fence_gate", copyBlock, platform); + createPyriteBlock(blockID+"_wall_gate","fence_gate", copyBlock); } //Generate a Turf block set - including block and its slab, stair, and carpet variants. - public static void createTurfSet(String blockID, Block copyBlock, String platform) { - createPyriteBlock( blockID+"_turf", "block", copyBlock, platform); - createStair(blockID, copyBlock, platform); - createSlab(blockID, copyBlock, platform); - createCarpet(blockID+"_carpet", platform); + public static void createTurfSet(String blockID, Block copyBlock) { + createPyriteBlock( blockID+"_turf", "block", copyBlock); + createStair(blockID, copyBlock); + createSlab(blockID, copyBlock); + createCarpet(blockID+"_carpet"); } //Generate an entire wood set. - public static void createWoodSet(String blockID, MapColor color, int blockLux, String platform) { + public static void createWoodSet(String blockID, MapColor color, int blockLux) { BlockSetType GENERATED_SET = new BlockSetType(blockID); WoodType GENERATED_TYPE = new WoodType(blockID, GENERATED_SET); //Stained Planks - createPyriteBlock( blockID+"_planks", "block", Blocks.OAK_PLANKS, color, blockLux, platform); + createPyriteBlock( blockID+"_planks", "block", Blocks.OAK_PLANKS, color, blockLux); //Stained Stairs - createPyriteBlock(blockID+"_stairs", "stairs",Blocks.OAK_STAIRS, color, blockLux, platform); + createPyriteBlock(blockID+"_stairs", "stairs",Blocks.OAK_STAIRS, color, blockLux); //Stained Slabs - createPyriteBlock( blockID+"_slab", "slab", Blocks.OAK_SLAB, color, blockLux, platform); + createPyriteBlock( blockID+"_slab", "slab", Blocks.OAK_SLAB, color, blockLux); //Stained Pressure Plates - createPyriteBlock( blockID+"_pressure_plate", "pressure_plate", Blocks.OAK_PRESSURE_PLATE, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock( blockID+"_pressure_plate", "pressure_plate", Blocks.OAK_PRESSURE_PLATE, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Stained Buttons - createPyriteBlock(blockID+"_button", "button", Blocks.OAK_BUTTON, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock(blockID+"_button", "button", Blocks.OAK_BUTTON, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Stained Fences - createPyriteBlock(blockID+"_fence", "fence", Blocks.OAK_FENCE, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock(blockID+"_fence", "fence", Blocks.OAK_FENCE, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Stained Fence Gates - createPyriteBlock(blockID+"_fence_gate", "fence_gate", Blocks.OAK_FENCE_GATE, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock(blockID+"_fence_gate", "fence_gate", Blocks.OAK_FENCE_GATE, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Stained Doors - createPyriteBlock(blockID+"_door", "door", Blocks.OAK_DOOR, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock(blockID+"_door", "door", Blocks.OAK_DOOR, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Stained Trapdoors - createPyriteBlock(blockID+"_trapdoor", "trapdoor", Blocks.OAK_TRAPDOOR, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock(blockID+"_trapdoor", "trapdoor", Blocks.OAK_TRAPDOOR, color, blockLux, GENERATED_SET, GENERATED_TYPE); //Crafting Tables - createPyriteBlock( blockID+"_crafting_table", "crafting", Blocks.CRAFTING_TABLE, color, blockLux, platform); - createPyriteBlock( blockID+"_ladder", "ladder", Blocks.LADDER, color, blockLux, platform); -// createPyriteBlock(blockID+"_sign", "sign", Blocks.OAK_SIGN, color, blockLux, GENERATED_SET, GENERATED_TYPE, platform); + createPyriteBlock( blockID+"_crafting_table", "crafting", Blocks.CRAFTING_TABLE, color, blockLux); + createPyriteBlock( blockID+"_ladder", "ladder", Blocks.LADDER, color, blockLux); +// createPyriteBlock(blockID+"_sign", "sign", Blocks.OAK_SIGN, color, blockLux, GENERATED_SET, GENERATED_TYPE); } //Generate an entire Cut Block set. - public static void createCutBlocks(String blockID, Block block, String platform) { + public static void createCutBlocks(String blockID, Block block) { String cutBlockID = "cut_" + blockID; if (!blockID.contains("copper")) { //Cut Block - createPyriteBlock(cutBlockID, block, platform); + createPyriteBlock(cutBlockID, block); //Cut Stairs - createStair(cutBlockID, block, platform); + createStair(cutBlockID, block); //Cut Slab - createSlab(cutBlockID, block, platform); + createSlab(cutBlockID, block); } //Cut Wall - createPyriteBlock(cutBlockID+"_wall", "wall", block, platform); + createPyriteBlock(cutBlockID+"_wall", "wall", block); //Cut Wall Gate - createPyriteBlock(cutBlockID+"_wall_gate","fence_gate", block, platform); + createPyriteBlock(cutBlockID+"_wall_gate","fence_gate", block); } //Generate an entire Smooth Block set. - public static void createSmoothBlocks(String blockID, Block block, String platform) { + public static void createSmoothBlocks(String blockID, Block block) { String smoothBlockID = "smooth_" + blockID; if (!Objects.equals(blockID, "quartz")) { //Smooth Block - createPyriteBlock(smoothBlockID, block, platform); + createPyriteBlock(smoothBlockID, block); //Smooth Stairs - createStair(smoothBlockID, block, platform); + createStair(smoothBlockID, block); //Smooth Slab - createSlab(smoothBlockID, block, platform); + createSlab(smoothBlockID, block); } //Smooth Wall - createPyriteBlock(smoothBlockID+"_wall", "wall", block, platform); + createPyriteBlock(smoothBlockID+"_wall", "wall", block); //Smooth Wall Gate - createPyriteBlock(smoothBlockID+"_wall_gate","fence_gate", block, platform); + createPyriteBlock(smoothBlockID+"_wall_gate","fence_gate", block); } //Create a set of Resource Blocks - public static void createResourceBlockSet(String blockID, Block block, String platform) { + public static void createResourceBlockSet(String blockID, Block block) { //Create Cut Blocks for those that don't already exist (Copper) - createCutBlocks(blockID, block, platform); + createCutBlocks(blockID, block); //Create Bricks/Chiseled/Pillar/Smooth for those that don't already exist (Quartz) if (!Objects.equals(blockID, "quartz")) { //Brick Blocks - createPyriteBlock(blockID+"_bricks", block, platform); + createPyriteBlock(blockID+"_bricks", block); //Chiseled Blocks - Copper Blocks - if (blockID.contains("copper")) { - if (!isTrialsOrLater(platform)) { - createPyriteBlock("chiseled_"+blockID+"_block", "log", block, platform); - } - } - else { - createPyriteBlock("chiseled_"+blockID+"_block", "log", block, platform); - } + createPyriteBlock("chiseled_"+blockID+"_block", "log", block); //Pillar Blocks - createPyriteBlock(blockID+"_pillar", "log", block, platform); + createPyriteBlock(blockID+"_pillar", "log", block); } //Smooth Blocks - createSmoothBlocks(blockID, block, platform); - createPyriteBlock("nostalgia_"+blockID+"_block", block, platform); + createSmoothBlocks(blockID, block); + createPyriteBlock("nostalgia_"+blockID+"_block", block); //Block set for modded blocks BlockSetType set = getBlockSetType(blockID); //Create Bars/Doors/Trapdoors/Plates for those that don't already exist (Iron) if (!Objects.equals(blockID, "iron")) { //Bars - createPyriteBlock(blockID+"_bars","bars", block, platform); - //Disable Copper doors in 1.21+ - if (blockID.contains("copper")) { - if (!isTrialsOrLater(platform)) { - createPyriteBlock(blockID+"_door","door", block, set, platform); - } - } - else { - createPyriteBlock(blockID+"_door","door", block, set, platform); - } - createPyriteBlock(blockID+"_trapdoor","trapdoor", block, set, platform); + createPyriteBlock(blockID+"_bars","bars", block); + createPyriteBlock(blockID+"_door","door", block, set); + createPyriteBlock(blockID+"_trapdoor","trapdoor", block, set); //Create Plates for those that don't already exist (Iron and Gold) if (!Objects.equals(blockID, "gold")) { - createPyriteBlock(blockID+"_pressure_plate","pressure_plate", block, set, platform); + createPyriteBlock(blockID+"_pressure_plate","pressure_plate", block, set); } } //Create buttons for all blocks. - createPyriteBlock(blockID+"_button","button", block, set, platform); + createPyriteBlock(blockID+"_button","button", block, set); } } diff --git a/fabric/src/main/java/cc/cassian/pyrite/fabric/PyriteFabric.java b/fabric/src/main/java/cc/cassian/pyrite/fabric/PyriteFabric.java index 1827cb5fd..fc8d0478b 100644 --- a/fabric/src/main/java/cc/cassian/pyrite/fabric/PyriteFabric.java +++ b/fabric/src/main/java/cc/cassian/pyrite/fabric/PyriteFabric.java @@ -2,7 +2,6 @@ import cc.cassian.pyrite.Pyrite; import net.fabricmc.api.ModInitializer; -import net.minecraft.SharedConstants; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.util.Identifier; @@ -14,7 +13,7 @@ public class PyriteFabric implements ModInitializer { @Override public void onInitialize() { - Pyrite.init(SharedConstants.WORLD_VERSION + "-fabric"); + Pyrite.init(); Registry.register(Registries.ITEM_GROUP, Identifier.of(modID, "pyrite_group"), PYRITE_GROUP); registerFuelBlocks(); } diff --git a/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java b/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java index f0ad7edd3..b08c74443 100644 --- a/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java +++ b/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java @@ -1,7 +1,6 @@ package cc.cassian.pyrite.forge; import dev.architectury.platform.forge.EventBuses; -import net.minecraft.SharedConstants; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @@ -15,7 +14,7 @@ public PyriteForge() { EventBuses.registerModEventBus(Pyrite.modID, FMLJavaModLoadingContext.get().getModEventBus()); IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); // Run our common setup. - Pyrite.init(SharedConstants.WORLD_VERSION + "-forge"); + Pyrite.init(); modEventBus.addListener(PyriteClient::registerBlockColors); modEventBus.addListener(PyriteClient::registerItemColorHandlers);