Fixed bamboo being stupid, also updated Forge

Closes #89
This commit is contained in:
Ellpeck 2020-03-14 00:47:54 +01:00
parent c0cc6166c1
commit 1a825edda3
2 changed files with 8 additions and 3 deletions

View file

@ -98,7 +98,7 @@ repositories {
}
dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.0.14'
minecraft 'net.minecraftforge:forge:1.15.2-31.1.19'
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")

View file

@ -73,8 +73,13 @@ public class PlantBoostEffect implements IDrainSpotEffect {
if (block instanceof IGrowable && !(block instanceof DoublePlantBlock) && !(block instanceof TallGrassBlock) && block != Blocks.GRASS_BLOCK) {
IGrowable growable = (IGrowable) block;
if (growable.canGrow(world, plantPos, state, false)) {
growable.grow((ServerWorld) world, world.rand, plantPos, state);
try {
growable.grow((ServerWorld) world, world.rand, plantPos, state);
} catch (Exception e) {
// Vanilla issue causes bamboo to crash if grown close to world height
if (!(growable instanceof BambooBlock))
throw e;
}
BlockPos closestSpot = IAuraChunk.getHighestSpot(world, plantPos, 25, pos);
IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 3500);