Add out-of-box fast leaves decay
This commit is contained in:
parent
3926aa3878
commit
7b03a5c0d1
@ -26,3 +26,17 @@
|
|||||||
this.dropBlockAsItem(p_150126_1_, p_150126_2_, p_150126_3_, p_150126_4_, p_150126_1_.getBlockMetadata(p_150126_2_, p_150126_3_, p_150126_4_), 0);
|
this.dropBlockAsItem(p_150126_1_, p_150126_2_, p_150126_3_, p_150126_4_, p_150126_1_.getBlockMetadata(p_150126_2_, p_150126_3_, p_150126_4_), 0);
|
||||||
p_150126_1_.setBlockToAir(p_150126_2_, p_150126_3_, p_150126_4_);
|
p_150126_1_.setBlockToAir(p_150126_2_, p_150126_3_, p_150126_4_);
|
||||||
}
|
}
|
||||||
|
@@ -308,6 +320,13 @@
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, i2 | 8, 4);
|
||||||
|
}
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 8, 4);
|
||||||
|
+ // KCauldron start - fast leaves decay
|
||||||
|
+ if (net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayEnable.getValue()) {
|
||||||
|
+ int min = net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayMinTickTime.getValue();
|
||||||
|
+ int max = net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayMaxTickTime.getValue();
|
||||||
|
+ world.scheduleBlockUpdate(x, y, z, this, min + world.rand.nextInt(max - min));
|
||||||
|
+ }
|
||||||
|
+ // KCauldron end
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraftforge.cauldron.configuration.BoolSetting;
|
import net.minecraftforge.cauldron.configuration.BoolSetting;
|
||||||
import net.minecraftforge.cauldron.configuration.ConfigBase;
|
import net.minecraftforge.cauldron.configuration.ConfigBase;
|
||||||
|
import net.minecraftforge.cauldron.configuration.IntSetting;
|
||||||
import net.minecraftforge.cauldron.configuration.Setting;
|
import net.minecraftforge.cauldron.configuration.Setting;
|
||||||
import net.minecraftforge.cauldron.configuration.StringSetting;
|
import net.minecraftforge.cauldron.configuration.StringSetting;
|
||||||
|
|
||||||
@ -29,6 +30,12 @@ public class KCauldronConfig extends ConfigBase {
|
|||||||
|
|
||||||
public BoolSetting commonAllowNetherPortal = new BoolSetting(this,
|
public BoolSetting commonAllowNetherPortal = new BoolSetting(this,
|
||||||
"common.allowNetherPortalBesidesOverworld", false, "Allow nether portals in dimensions besides overworld");
|
"common.allowNetherPortalBesidesOverworld", false, "Allow nether portals in dimensions besides overworld");
|
||||||
|
public BoolSetting commonFastLeavesDecayEnable = new BoolSetting(this,
|
||||||
|
"common.fastLeavesDecay.enable", false, "Enable fast decaying of leaves, not affects drop chanches /etc");
|
||||||
|
public IntSetting commonFastLeavesDecayMinTickTime = new IntSetting(this,
|
||||||
|
"common.fastLeavesDecay.minTickTime", 5, "Minimal amount of tick between block updates");
|
||||||
|
public IntSetting commonFastLeavesDecayMaxTickTime = new IntSetting(this,
|
||||||
|
"common.fastLeavesDecay.maxTickTime", 10, "Minimal amount of tick between block updates");
|
||||||
|
|
||||||
public BoolSetting experimentalTileEntityListRecreation = new BoolSetting(this,
|
public BoolSetting experimentalTileEntityListRecreation = new BoolSetting(this,
|
||||||
"experimental.tileEntityListRecreation", false, "EXPERIMENTAL! Recreate list of TE each tick.");
|
"experimental.tileEntityListRecreation", false, "EXPERIMENTAL! Recreate list of TE each tick.");
|
||||||
@ -45,6 +52,9 @@ public class KCauldronConfig extends ConfigBase {
|
|||||||
register(loggingMaterialInjection);
|
register(loggingMaterialInjection);
|
||||||
register(loggingClientModList);
|
register(loggingClientModList);
|
||||||
register(commonAllowNetherPortal);
|
register(commonAllowNetherPortal);
|
||||||
|
register(commonFastLeavesDecayEnable);
|
||||||
|
register(commonFastLeavesDecayMinTickTime);
|
||||||
|
register(commonFastLeavesDecayMaxTickTime);
|
||||||
register(experimentalTileEntityListRecreation);
|
register(experimentalTileEntityListRecreation);
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user