diff --git a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/BlocksMC1_5.java b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/BlocksMC1_5.java index 576671ba..61f1f07e 100644 --- a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/BlocksMC1_5.java +++ b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/BlocksMC1_5.java @@ -28,6 +28,10 @@ public class BlocksMC1_5 implements BlockPropertiesSetup { // TODO: This is guessing ! + ///////////////////// + // New blocks + //////////////////// + // 146 Trapped Chest setFlagsAs(146, Material.CHEST); BlockProperties.setBlockProps(146, BlockProperties.getBlockProps(Material.CHEST.getId())); @@ -61,6 +65,13 @@ public class BlocksMC1_5 implements BlockPropertiesSetup { // 157 Activator Rail setFlagsAs(157, Material.DETECTOR_RAIL); + ///////////////////// + // Changed blocks + //////////////////// + + // 78 Snow + addFlags(78, BlockProperties.F_HEIGHT_8_INC); + } /** diff --git a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java index b4687202..53487afc 100644 --- a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -1428,6 +1428,10 @@ public class BlockProperties { if (data < 3) return 0; else return 0.5; } + else if ((flags & F_HEIGHT_8_INC) != 0){ + final int data = (access.getData(x, y, z) & 0xF) % 8; + return 0.125 * (double) data; + } // Height 100 is ignored (!). else if ((flags & F_HEIGHT150) != 0){ return 1.5; @@ -1781,6 +1785,11 @@ public class BlockProperties { // bmaxY = (double) (1 + data) / 8.0; bmaxY = data < 3 ? 0 : 0.5; } + else if ((flags & F_HEIGHT_8_INC) != 0){ + bminY = 0; + final int data = (access.getData(x, y, z) & 0xF) % 8; + bmaxY = 0.125 * data; + } else if ((flags & F_HEIGHT150) != 0){ bminY = 0; bmaxY = 1.5;