Skip to content

Commit

Permalink
Fix Menril Tree replacing grass with dirt on stump place fail
Browse files Browse the repository at this point in the history
Closes #1304
  • Loading branch information
rubensworks committed Sep 5, 2023
1 parent b5c24f6 commit 6810815
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,20 @@ public List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader wor
// Ensure dirt is below tree
BlockPos posStump = pos.below();
setDirtAt(world, callback, rand, posStump, config);
setDirtAt(world, callback, rand, posStump.north(), config);
setDirtAt(world, callback, rand, posStump.east(), config);
setDirtAt(world, callback, rand, posStump.south(), config);
setDirtAt(world, callback, rand, posStump.west(), config);

// Create stump
placeLog(world, callback, rand, pos.north(), config, Function.identity());
placeLog(world, callback, rand, pos.east(), config, Function.identity());
placeLog(world, callback, rand, pos.south(), config, Function.identity());
placeLog(world, callback, rand, pos.west(), config, Function.identity());
if (placeLog(world, callback, rand, pos.north(), config, Function.identity())) {
setDirtAt(world, callback, rand, posStump.north(), config);
}
if (placeLog(world, callback, rand, pos.east(), config, Function.identity())) {
setDirtAt(world, callback, rand, posStump.east(), config);
}
if (placeLog(world, callback, rand, pos.south(), config, Function.identity())) {
setDirtAt(world, callback, rand, posStump.south(), config);
}
if (placeLog(world, callback, rand, pos.west(), config, Function.identity())) {
setDirtAt(world, callback, rand, posStump.west(), config);
}

// Create base trunk
for(int i = 0; i < height; ++i) {
Expand Down

0 comments on commit 6810815

Please sign in to comment.