catch any exceptions in plant boosting

Closes #146
This commit is contained in:
Ell 2020-10-05 22:48:32 +02:00
parent 89de9fb688
commit 0c610b1b41

View file

@ -76,9 +76,8 @@ public class PlantBoostEffect implements IDrainSpotEffect {
try { try {
growable.grow((ServerWorld) world, world.rand, plantPos, state); growable.grow((ServerWorld) world, world.rand, plantPos, state);
} catch (Exception e) { } catch (Exception e) {
// Vanilla issue causes bamboo to crash if grown close to world height // a lot of stuff throws here (double plants where generation only caused half of it to exist, bamboo at world height...)
if (!(growable instanceof BambooBlock)) // so just catch all, bleh
throw e;
} }
BlockPos closestSpot = IAuraChunk.getHighestSpot(world, plantPos, 25, pos); BlockPos closestSpot = IAuraChunk.getHighestSpot(world, plantPos, 25, pos);
IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 3500); IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 3500);