mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 00:07:37 +00:00
Fix some corner cases in slab placement
This commit is contained in:
1 parent
bdfc938e52
commit
83c3d1c85c
2 files changed
+2
-2
No files matched your search
@@ -2572,7 +2572,7 @@ public enum Features {
|
||||
|
||||
private static void registerSlabTop(Block bottom, Block top) {
|
||||
String name = Block.blockRegistry.getNameForObject(bottom);
|
||||
name = name.substring(name.indexOf(':')) + "_top";
|
||||
name = name.substring(name.indexOf(':') + 1) + "_top";
|
||||
GameRegistry.registerBlock(top, ItemCarvableSlab.class, name);
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class ItemCarvableSlab extends ItemCarvable {
|
||||
|
||||
boolean metaEquals = world.getBlockMetadata(x2, y2, z2) == meta;
|
||||
// if the metadata at the place target matches, and the block there matches either the top of bottom slab, try to fill in the rest of the block
|
||||
if (metaEquals && ((at == block.top && (dir == ForgeDirection.DOWN || hy == 1.0D)) || (at == block.bottom && (dir == ForgeDirection.UP || hy == 0)))) {
|
||||
if (metaEquals && ((at == block.top && (hy <= 0.5D || hy == 1.0D)) || (at == block.bottom && (hy > 0.5D || hy == 0)))) {
|
||||
place(stack, world, x2, y2, z2, block.master, meta);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user