mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-13 17:04:01 +00:00
Remove useless parameter
This commit is contained in:
1 parent
198ba19ebb
commit
af275f3e94
2 files changed
+4
-10
No files matched your search
@@ -14,18 +14,15 @@ public enum Mixin {
|
||||
//
|
||||
|
||||
// Replace with your own mixins:
|
||||
ItemEditableBookMixin("minecraft.ItemEditableBookMixin", false, VANILLA),
|
||||
ItemEditableBookMixin("minecraft.ItemEditableBookMixin", VANILLA),
|
||||
// You may also require multiple mods to be loaded if your mixin requires both
|
||||
GT_Block_Ores_AbstractMixin("gregtech.GT_Block_Ores_AbstractMixin", false, GREGTECH, VANILLA);
|
||||
GT_Block_Ores_AbstractMixin("gregtech.GT_Block_Ores_AbstractMixin", GREGTECH, VANILLA);
|
||||
|
||||
public final String mixinClass;
|
||||
public final List<TargetedMod> targetedMods;
|
||||
// Injecting into @SideOnly(Side.Client) classes will crash the server. Flag them as clientSideOnly!
|
||||
public final boolean clientSideOnly;
|
||||
|
||||
Mixin(String mixinClass, boolean clientSideOnly, TargetedMod... targetedMods) {
|
||||
Mixin(String mixinClass, TargetedMod... targetedMods) {
|
||||
this.mixinClass = mixinClass;
|
||||
this.targetedMods = Arrays.asList(targetedMods);
|
||||
this.clientSideOnly = clientSideOnly;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.myname.mymodid.mixinplugin;
|
||||
|
||||
import com.myname.mymodid.Tags;
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -47,7 +46,6 @@ public class MixinPlugin implements IMixinConfigPlugin {
|
||||
// This method return a List<String> of mixins. Every mixins in this list will be loaded.
|
||||
@Override
|
||||
public List<String> getMixins() {
|
||||
final boolean loadClientSideOnlyClasses = FMLLaunchHandler.side().isClient();
|
||||
final boolean isDevelopmentEnvironment = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
||||
|
||||
List<TargetedMod> loadedMods = Arrays.stream(TargetedMod.values())
|
||||
@@ -66,8 +64,7 @@ public class MixinPlugin implements IMixinConfigPlugin {
|
||||
|
||||
List<String> mixins = new ArrayList<>();
|
||||
for (Mixin mixin : Mixin.values()) {
|
||||
if (loadedMods.containsAll(mixin.targetedMods)
|
||||
&& (mixin.clientSideOnly == false || loadClientSideOnlyClasses)) {
|
||||
if (loadedMods.containsAll(mixin.targetedMods)) {
|
||||
mixins.add(mixin.mixinClass);
|
||||
LOG.debug("Loading mixin: " + mixin.mixinClass);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user