From 165af2ccafdb5dbcec0ba654aa54c89b75c37306 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 2 Feb 2014 23:51:53 +0100 Subject: [PATCH] [BLIND] Try to fix ender portal frames. --- .../utilities/BlockProperties.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java index 611ba6b3..d3184349 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -1599,6 +1599,15 @@ public class BlockProperties { else if (id == Material.PISTON_EXTENSION.getId()){ return 0.625; } + else if (id == Material.ENDER_PORTAL_FRAME.getId()) { + // TODO: Test + // TODO: Other concepts ... + if ((access.getData(x, y, z) & 0x04) != 0) { + return 1.0; + } else { + return bounds[4]; + } + } else if ((flags & F_GROUND_HEIGHT) != 0){ // All blocks that are not treated individually are ground all through. // TODO: Experimental workaround. @@ -1972,7 +1981,17 @@ public class BlockProperties { else{ bmaxY = 1.0; } - } + } + else if (id == Material.ENDER_PORTAL_FRAME.getId()) { + // TODO: Test + // TODO: Other concepts ... + bminY = 0; + if ((access.getData(x, y, z) & 0x04) != 0) { + bmaxY = 1.0; + } else { + bmaxY = bounds[4]; + } + } else{ bminY = bounds[1]; // minY bmaxY = bounds[4]; // maxY