From f42817a6f21dffb90b8b690712d2c6bf6b6ce04c Mon Sep 17 00:00:00 2001 From: asofold Date: Thu, 21 Mar 2013 16:45:56 +0100 Subject: [PATCH] Run "hand-picked" before MCAccess, if it implements BlockPropertiesSetup. --- .../utilities/BlockProperties.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 e8902db1..73f97d42 100644 --- a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -355,18 +355,7 @@ public class BlockProperties { try{ initTools(mcAccess, worldConfigProvider); initBlocks(mcAccess, worldConfigProvider); - // Allow mcAccess to setup block properties. - if (mcAccess instanceof BlockPropertiesSetup){ - try{ - ((BlockPropertiesSetup) mcAccess).setupBlockProperties(worldConfigProvider); - } - catch(Throwable t){ - LogUtil.logSevere("[NoCheatPlus] McAccess.setupBlockProperties could not execute properly: " + t.getClass().getSimpleName()); - LogUtil.logSevere(t); - } - } // Extra hand picked setups. - // TODO: Add registry for further BlockPropertiesSetup instances. try{ BlockPropertiesSetup bpSetup = new BlocksMC1_5(); try{ @@ -379,6 +368,17 @@ public class BlockProperties { } } catch(Throwable t){} + // Allow mcAccess to setup block properties. + if (mcAccess instanceof BlockPropertiesSetup){ + try{ + ((BlockPropertiesSetup) mcAccess).setupBlockProperties(worldConfigProvider); + } + catch(Throwable t){ + LogUtil.logSevere("[NoCheatPlus] McAccess.setupBlockProperties could not execute properly: " + t.getClass().getSimpleName()); + LogUtil.logSevere(t); + } + } + // TODO: Add registry for further BlockPropertiesSetup instances. } catch(Throwable t){ LogUtil.logSevere(t);