Skip to content
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 @@ -73,7 +73,7 @@ public ActionProcessingResult handle(
world.setBlock(pos, blockState, UPDATE_FLAG);
if (tileEntityData != null)
{
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror().getRotationMirror());
}
return ActionProcessingResult.PASS;
}
Expand All @@ -85,7 +85,7 @@ public ActionProcessingResult handle(

if (tileEntityData != null)
{
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror().getRotationMirror());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public ActionProcessingResult handle(
{
try
{
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror().getRotationMirror());
placementState.getBlock().setPlacedBy(world, pos, placementState, null, placementState.getBlock().getCloneItemStack(placementState,
new BlockHitResult(new Vec3(0, 0, 0), Direction.NORTH, pos, false), world, pos, null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public ActionProcessingResult handle(
{
try
{
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos.above(), placementContext.getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos, placementContext.getRotationMirror().getRotationMirror());
handleTileEntityPlacement(tileEntityData, world, pos.above(), placementContext.getRotationMirror().getRotationMirror());
}
catch (final Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,22 +350,7 @@ public List<ItemStack> getRequiredItems(

if (!BlockUtils.isAnySolid(world.getBlockState(pos.below())))
{
BlockPos posBelow = pos;
BlockState supportBlockState = Blocks.DIRT instanceof Fallable ? Blocks.STONE.defaultBlockState() : Blocks.DIRT.defaultBlockState();
for (int i = 0; i < 10; i++) // try up to ten blocks below for solid worldgen
{
posBelow = posBelow.below();
final boolean isFirstTest = i == 0;
final BlockState possibleSupport = BlockUtils.getWorldgenBlock(world, posBelow, bp -> isFirstTest ? blockState : null);
if (possibleSupport != null && BlockUtils.canBlockFloatInAir(possibleSupport) && !canHandle(world,
posBelow,
possibleSupport))
{
supportBlockState = possibleSupport;
break;
}
}

BlockState supportBlockState = placementContext.getSolidBlockForPos(pos, placementContext.getBluePrint().getRawBlockStateFunction());
if (canHandle(world, pos, supportBlockState))
{
Log.getLogger().warn("Unable to use: " + supportBlockState + " as support for a falling block, it is either a falling black itself or made fallable");
Expand Down Expand Up @@ -393,19 +378,7 @@ public ActionProcessingResult handle(

if (!BlockUtils.isAnySolid(world.getBlockState(pos.below())))
{
BlockPos posBelow = pos;
BlockState supportBlockState = Blocks.DIRT.defaultBlockState();
for (int i = 0; i < 10; i++) // try up to ten blocks below for solid worldgen
{
posBelow = posBelow.below();
final boolean isFirstTest = i == 0;
final BlockState possibleSupport = BlockUtils.getWorldgenBlock(world, posBelow, bp -> isFirstTest ? blockState : null);
if (possibleSupport != null && BlockUtils.canBlockFloatInAir(possibleSupport))
{
supportBlockState = possibleSupport;
break;
}
}
BlockState supportBlockState = placementContext.getSolidBlockForPos(pos, placementContext.getBluePrint().getRawBlockStateFunction());
handleBlockPlacement(world, pos.below(), supportBlockState);
}

Expand Down
Loading