From 8bb9a3bfae9ad2eb48f0d3849c014a1d5198eaa1 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 19 Nov 2012 11:40:02 +0100 Subject: [PATCH] BlockCache: Add fall-back-compatibility method for 1.4.2. --- .../nocheatplus/utilities/BlockCache.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/utilities/BlockCache.java b/src/fr/neatmonster/nocheatplus/utilities/BlockCache.java index 5cea0a53..0d9a9d00 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/BlockCache.java +++ b/src/fr/neatmonster/nocheatplus/utilities/BlockCache.java @@ -1,5 +1,6 @@ package fr.neatmonster.nocheatplus.utilities; +import net.minecraft.server.Block; import net.minecraft.server.IBlockAccess; import net.minecraft.server.Material; import net.minecraft.server.TileEntity; @@ -113,8 +114,20 @@ public class BlockCache implements IBlockAccess{ } @Override - public boolean t(int arg0, int arg1, int arg2) { - return access.t(arg0, arg1, arg2); + public boolean t(int x, int y, int z) { + // Routes to Block.i(getTypeId(x,y,z)) <- ominous i ! + return access.t(x, y, z); + } + + /** + * Compatibility: CB 1.4.2 + * @param arg0 + * @param arg1 + * @param arg2 + * @return + */ + public boolean s(int x, int y, int z) { + return Block.i(getTypeId(x, y, z)); } }