Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockRedstoneClock> redstoneClock = new BlockClassEntry<BlockRedstoneClock>(BlockRedstoneClock.class) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class BlockCursedEarth extends XUBlockConnectedTextureBase {
public static final WeakLinkedSet<Entity> cursedClient = new WeakLinkedSet<>();
static final UUID uuid = UUID.fromString("E53E0344-EA5E-4F71-98F6-40791198D8FE");
public static Set<String> entity_blacklist = new HashSet<>();
public static boolean spawnParticles = true;
ISolidWorldTexture tex;
ISolidWorldTexture side;
ISolidWorldTexture bottom;
Expand Down Expand Up @@ -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);
}
}
}

Expand Down