diff --git a/1.10.2/src/main/java/com/rwtema/extrautils2/backend/entries/XU2Entries.java b/1.10.2/src/main/java/com/rwtema/extrautils2/backend/entries/XU2Entries.java index 1c05e27..cb231bc 100644 --- a/1.10.2/src/main/java/com/rwtema/extrautils2/backend/entries/XU2Entries.java +++ b/1.10.2/src/main/java/com/rwtema/extrautils2/backend/entries/XU2Entries.java @@ -298,6 +298,7 @@ public void addAchievements() { @Override public void loadAdditionalConfig(Configuration config) { Collections.addAll(BlockCursedEarth.entity_blacklist, config.getStringList("Cursed Earth Entity BlackList", ConfigHelper.GAMEPLAY_CATEGORY, new String[0], "Add an entity id (mod:name) to this list to prevent cursed earth from spawning it.")); + BlockCursedEarth.spawnParticles = config.getBoolean("Spawn Particles", Configuration.CATEGORY_CLIENT, true, "Toggles spawning of particles from cursed earth. Disable it if you have performance problems."); } }; public static BlockClassEntry redstoneClock = new BlockClassEntry(BlockRedstoneClock.class) { diff --git a/1.10.2/src/main/java/com/rwtema/extrautils2/blocks/BlockCursedEarth.java b/1.10.2/src/main/java/com/rwtema/extrautils2/blocks/BlockCursedEarth.java index 2af8fa2..dfbdf67 100644 --- a/1.10.2/src/main/java/com/rwtema/extrautils2/blocks/BlockCursedEarth.java +++ b/1.10.2/src/main/java/com/rwtema/extrautils2/blocks/BlockCursedEarth.java @@ -68,6 +68,7 @@ public class BlockCursedEarth extends XUBlockConnectedTextureBase { public static final WeakLinkedSet cursedClient = new WeakLinkedSet<>(); static final UUID uuid = UUID.fromString("E53E0344-EA5E-4F71-98F6-40791198D8FE"); public static Set entity_blacklist = new HashSet<>(); + public static boolean spawnParticles = true; ISolidWorldTexture tex; ISolidWorldTexture side; ISolidWorldTexture bottom; @@ -156,14 +157,16 @@ public boolean canSilkHarvest(World world, BlockPos pos, @Nonnull IBlockState st @Override public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { - int numParticles = (MAX_DECAY - stateIn.getValue(DECAY)); - for (int i = 0; i < numParticles; i++) { - worldIn.spawnParticle( - EnumParticleTypes.SMOKE_NORMAL, - pos.getX() + rand.nextDouble(), - pos.getY() + 1.01, - pos.getZ() + rand.nextDouble(), - 0.0D, 0.0D, 0.0D); + if (spawnParticles) { + int numParticles = (MAX_DECAY - stateIn.getValue(DECAY)); + for (int i = 0; i < numParticles; i++) { + worldIn.spawnParticle( + EnumParticleTypes.SMOKE_NORMAL, + pos.getX() + rand.nextDouble(), + pos.getY() + 1.01, + pos.getZ() + rand.nextDouble(), + 0.0D, 0.0D, 0.0D); + } } }