Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
5 changes: 5 additions & 0 deletions src/main/java/carpetextra/CarpetExtraSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ public Integer validate(ServerCommandSource source, CarpetRule<Integer> currentR
)
public static boolean accurateBlockPlacement = false;

@Rule(
categories = {EXTRA, SURVIVAL}
)
public static boolean accurateBlockPlacementLegacy = false;

@Rule(
categories = {EXTRA, EXPERIMENTAL, FEATURE, DISPENSER}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ public class BlockItemMixin_accurateBlockPlacement
))
private BlockState getAlternatePlacement(Block block, ItemPlacementContext context)
{
if (CarpetExtraSettings.accurateBlockPlacement)
if (CarpetExtraSettings.accurateBlockPlacement || CarpetExtraSettings.accurateBlockPlacementLegacy)
{
BlockState tryAlternative = BlockPlacer.alternativeBlockPlacement(block, context);
BlockState tryAlternative = BlockPlacer.applyAlternativeBlockPlacement(block.getPlacementState(context), BlockPlacer.UseContext.from(context, context.getHand()));
if (tryAlternative != null)
return tryAlternative;
}
return block.getPlacementState(context);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class ServerPlayNetworkHandlerMixin
require = 0)
private Vec3d carpetextra_removeHitPosCheck(Vec3d hitVec, Vec3d blockCenter)
{
if (CarpetExtraSettings.accurateBlockPlacement)
if (CarpetExtraSettings.accurateBlockPlacement || CarpetExtraSettings.accurateBlockPlacementLegacy)
{
return Vec3d.ZERO;
}
Expand Down
Loading
Loading