Skip to content

Commit 48d1bfc

Browse files
committed
Fix plant
1 parent 05958d7 commit 48d1bfc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/resources/forge-1.14.4/templates/plant/plant.java.ftl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,16 @@ public class ${name}Block extends ${getPlantClass(data.plantType)}Block
229229
}
230230
</#if>
231231

232-
@Override public boolean isValidPosition(BlockState blockstate, IWorldReader worldIn, BlockPos pos) {
232+
@Override public boolean isValidPosition(BlockState blockstate, IWorldReader world, BlockPos pos) {
233233
BlockPos blockpos = pos.down();
234-
BlockState groundState = worldIn.getBlockState(blockpos);
234+
BlockState groundState = world.getBlockState(blockpos);
235235

236236
<#if data.plantType == "normal" || data.plantType == "sapling">
237-
return this.isValidGround(groundState, worldIn, blockpos)
237+
return this.isValidGround(groundState, world, blockpos)
238238
<#elseif data.plantType == "growapable">
239239
<#if hasProcedure(data.placingCondition)>
240240
boolean additionalCondition = true;
241-
if (worldIn instanceof IWorld world) {
241+
if (world instanceof IWorld) {
242242
int x = pos.getX();
243243
int y = pos.getY();
244244
int z = pos.getZ();
@@ -256,7 +256,7 @@ public class ${name}Block extends ${getPlantClass(data.plantType)}Block
256256
if (blockstate.get(HALF) == DoubleBlockHalf.UPPER)
257257
return groundState.getBlock() == this && groundState.get(HALF) == DoubleBlockHalf.LOWER;
258258
else
259-
return this.isValidGround(groundState, worldIn, blockpos)
259+
return this.isValidGround(groundState, world, blockpos)
260260
</#if>;
261261
}
262262
</#if>

0 commit comments

Comments
 (0)