diff options
| author | Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> | 2023-10-18 17:03:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-18 18:03:23 +0200 |
| commit | fbdbb388c369fae549cfde3eed38b536f7461d90 (patch) | |
| tree | b46f7fc949d7e4c6e3be910b81ed725e6dc1648e /src/main/java/gtPlusPlus/plugin/fixes | |
| parent | b670446fdf49991093b485f0aa14050039632775 (diff) | |
| download | GT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.tar.gz GT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.tar.bz2 GT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.zip | |
Cleaning up (#767)
* Kill playerAPI
* Gut more events and compat that is now obsolete
* Remove commented out code
* Remove final modifier from methods
* Make more stuff final
* Remove slow building ring
* Protected -> private in final classes
* More cleaning
* More cleaning v2
* Purging
* Clean DevHelper
* Clean DevHelper 2
* delete DevHelper
* remove useless IFMLLoadingPlugin.MCVersion annotation from @Mod files
* check for obfuscation only once in the IFMLloadingPlugin.injectData
* don't instantiate the static class ASMConfig
* delete unused and empty implementation of IFMLCallHook
* delete empty class
* delete ClassesToTransform class that just holds the class names constants
* delete unused methods and unsless logging in dummymod container
* delete unused transformer ClassTransformer_TT_ThaumicRestorer
* spotless
* Clean
* Clean utils
* Build checkpoint
* Purge
* Stage 2
* Stage 3
* Stage 4
* Stage 5
* Stage 6
* Spotless
* Imports
* Stage idk
* Stage 1
* Fix issue
* Spotless
* Format numbers
---------
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Co-authored-by: Alexdoru <57050655+Alexdoru@users.noreply.github.com>
Co-authored-by: Connor Colenso <colen@CONNORSPC>
Diffstat (limited to 'src/main/java/gtPlusPlus/plugin/fixes')
3 files changed, 19 insertions, 23 deletions
diff --git a/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java b/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java index 4d87a746f3..b35ad2c063 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java @@ -2,5 +2,5 @@ package gtPlusPlus.plugin.fixes.interfaces; public interface IBugFix { - public boolean isFixValid(); + boolean isFixValid(); } diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java index f4c4df492e..2fa92951c7 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java @@ -13,7 +13,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.plugin.fixes.interfaces.IBugFix; -import gtPlusPlus.preloader.DevHelper; +import gtPlusPlus.preloader.CORE_Preloader; public class VanillaBedHeightFix implements IBugFix { @@ -22,25 +22,21 @@ public class VanillaBedHeightFix implements IBugFix { public VanillaBedHeightFix(IPlugin minstance) { mParent = minstance; - if (DevHelper.isValidHelperObject()) { - Method m; - if (DevHelper.isObfuscatedEnvironment()) { - m = ReflectionUtils.getMethod(EntityPlayer.class, "func_71018_a", int.class, int.class, int.class); - } else { - m = ReflectionUtils.getMethod( - net.minecraft.entity.player.EntityPlayer.class, - "sleepInBedAt", - int.class, - int.class, - int.class); - } - if (m != null) { - mSleepInBedAt = m; - mParent.log("Registering Bed Height Fix."); - Utils.registerEvent(this); - } else { - mSleepInBedAt = null; - } + Method m; + if (!CORE_Preloader.DEV_ENVIRONMENT) { + m = ReflectionUtils.getMethod(EntityPlayer.class, "func_71018_a", int.class, int.class, int.class); + } else { + m = ReflectionUtils.getMethod( + net.minecraft.entity.player.EntityPlayer.class, + "sleepInBedAt", + int.class, + int.class, + int.class); + } + if (m != null) { + mSleepInBedAt = m; + mParent.log("Registering Bed Height Fix."); + Utils.registerEvent(this); } else { mSleepInBedAt = null; } diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java index 98657b455f..ed1d9890d7 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java @@ -62,13 +62,13 @@ public class MusicTocker extends MusicTicker implements Runnable { return false; } - private final void updateInternalNumber() { + private void updateInternalNumber() { if (ReflectionUtils.doesFieldExist(getClass(), "field_147676_d")) { ReflectionUtils.setField(this, "field_147676_d", mTimeUntilNextTrack); } } - private final void updateInternalSound(ISound aSound) { + private void updateInternalSound(ISound aSound) { if (ReflectionUtils.doesFieldExist(getClass(), "field_147678_c")) { ReflectionUtils.setField(this, "field_147678_c", aSound); } |
