From 7ddb7f5e8ed9fe60b730183c7a04f3bce3b8f815 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Wed, 24 Jan 2018 18:38:51 +1000 Subject: $ Several 5.08 compat fixes. $ Fixed pollution, which was causing all multiblocks to fail. This was pointed out in #191 by @CodeWarrior0, however I decided to re-do it myself to better handle the .08 compat. $ Fixed all multiblocks being broken as fuck. Fixes #190, fixes #186 and also fixes #176. - Removed some useless logging from the mining explosives. --- src/Java/gtPlusPlus/core/util/PollutionUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/PollutionUtils.java b/src/Java/gtPlusPlus/core/util/PollutionUtils.java index a73a89b85c..7e8de5f706 100644 --- a/src/Java/gtPlusPlus/core/util/PollutionUtils.java +++ b/src/Java/gtPlusPlus/core/util/PollutionUtils.java @@ -5,6 +5,7 @@ import java.lang.reflect.*; import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.common.GT_Proxy; +import gtPlusPlus.core.util.reflect.ReflectionUtils; public class PollutionUtils { @@ -12,12 +13,12 @@ public class PollutionUtils { try { GT_Proxy GT_Pollution = GT_Mod.gregtechproxy; if (GT_Pollution != null) { - Field mPollution = GT_Pollution.getClass().getField("mPollution"); + Field mPollution = ReflectionUtils.getField(GT_Pollution.getClass(), "mPollution"); if (mPollution != null) { return mPollution.getBoolean(GT_Pollution); } } - } catch (SecurityException | IllegalArgumentException | NoSuchFieldException | IllegalAccessException e) { + } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) { return false; } return false; -- cgit