diff --git a/src/main/java/galena/oreganized/Oreganized.java b/src/main/java/galena/oreganized/Oreganized.java index 8b2b1bb8..50cb64b4 100644 --- a/src/main/java/galena/oreganized/Oreganized.java +++ b/src/main/java/galena/oreganized/Oreganized.java @@ -200,10 +200,12 @@ private void setup(FMLCommonSetupEvent event) { POWDER_SNOW.put(OItems.MOLTEN_LEAD_BUCKET.get(), MoltenLeadCauldronBlock.FILL_MOLTEN_LEAD); LEAD.put(OItems.MOLTEN_LEAD_BUCKET.get(), MoltenLeadCauldronBlock.FILL_MOLTEN_LEAD); - EMPTY.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); - WATER.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); - LAVA.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); - POWDER_SNOW.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); + if(OreganizedConfig.COMMON.cauldronLeadMelting.get()) { + EMPTY.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); + WATER.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); + LAVA.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); + POWDER_SNOW.put(OBlocks.LEAD_BLOCK.get().asItem(), MoltenLeadCauldronBlock.FILL_LEAD_BLOCK); + } LEAD.put(Items.AIR, MoltenLeadCauldronBlock.EMPTY_LEAD_BLOCK); LEAD.put(Items.BUCKET, MoltenLeadCauldronBlock.EMPTY_MOLTEN_LEAD); diff --git a/src/main/java/galena/oreganized/OreganizedConfig.java b/src/main/java/galena/oreganized/OreganizedConfig.java index 5b31f5b1..afa07836 100644 --- a/src/main/java/galena/oreganized/OreganizedConfig.java +++ b/src/main/java/galena/oreganized/OreganizedConfig.java @@ -20,6 +20,7 @@ public static class Common { public final ConfigValue pillagerSpawnWithBolts; public final ConfigValue scribeSilkTouchStone; public final ConfigValue moltenLeadDelay; + public final ConfigValue cauldronLeadMelting; private Common(ForgeConfigSpec.Builder builder) { builder.comment("Common"); @@ -30,6 +31,7 @@ private Common(ForgeConfigSpec.Builder builder) { pillagerSpawnWithBolts = builder.comment("Pillagers have a chance to spawn with a lead bolt in their offhand").define("pillagerSpawnWithBolts", true); scribeSilkTouchStone = builder.comment("The scribe is able to silk-touch pickaxe-related blocks").define("scribeSilkTouchStone", true); moltenLeadDelay = builder.comment("Time in ticks molten lead waits until flowing downwards").defineInRange("moltenLeadDelay", 20 * 10, 0, 20 * 100); + cauldronLeadMelting = builder.comment("Can lead blocks be placed into a cauldron to melt?").define("cauldronLeadMelting", true); builder.pop(); } diff --git a/src/main/java/galena/oreganized/content/block/MoltenLeadCauldronBlock.java b/src/main/java/galena/oreganized/content/block/MoltenLeadCauldronBlock.java index e6a9a7c1..465a35ad 100644 --- a/src/main/java/galena/oreganized/content/block/MoltenLeadCauldronBlock.java +++ b/src/main/java/galena/oreganized/content/block/MoltenLeadCauldronBlock.java @@ -1,5 +1,6 @@ package galena.oreganized.content.block; +import galena.oreganized.OreganizedConfig; import galena.oreganized.index.OBlocks; import galena.oreganized.index.OItems; import galena.oreganized.index.OTags; @@ -25,7 +26,6 @@ import net.minecraft.world.level.block.AbstractCauldronBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.CauldronBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -113,7 +113,7 @@ public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource int age = state.getValue(AGE); if (age < max_age && random.nextInt(1) == 0) { BlockState below = world.getBlockState(pos.below()); - if (below.is(OTags.Blocks.FIRE_SOURCE) || below.getFluidState().is(FluidTags.LAVA)) { + if ((below.is(OTags.Blocks.FIRE_SOURCE) || below.getFluidState().is(FluidTags.LAVA)) && OreganizedConfig.COMMON.cauldronLeadMelting.get()) { world.setBlockAndUpdate(pos, state.setValue(AGE, age + 1)); return; }