mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-18 01:05:06 +00:00
AntiIDConflict do not log placeholders
This commit is contained in:
4 files changed
-45
No files matched your search
@@ -18,8 +18,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
dependencies = "required-after:falsepatternlib@[0.9.1,);after:antiidconflict")
|
||||
public class EndlessIDs {
|
||||
public static final Logger LOG = LogManager.getLogger(Tags.MODNAME);
|
||||
public static BiomeGenBase[] fakeBiomeArray;
|
||||
public static boolean postInitFinished = false;
|
||||
|
||||
private static void antiIdConflictLatePatch() {
|
||||
BiomesManager.conflicts = new BiomesManager.ConflictingBiomes[ExtendedConstants.biomeIDCount];
|
||||
@@ -31,10 +29,4 @@ public class EndlessIDs {
|
||||
antiIdConflictLatePatch();
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
postInitFinished = true;
|
||||
fakeBiomeArray = null;
|
||||
}
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import lombok.val;
|
||||
import org.spongepowered.asm.lib.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
@Mixin(BiomeGenBase.class)
|
||||
public abstract class BiomeGenBaseMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
private static BiomeGenBase[] biomeList;
|
||||
|
||||
@Redirect(method = "getBiomeGenArray",
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/biome/BiomeGenBase;biomeList:[Lnet/minecraft/world/biome/BiomeGenBase;",
|
||||
opcode = Opcodes.GETSTATIC),
|
||||
require = 1)
|
||||
private static BiomeGenBase[] returnFakeArray() {
|
||||
if (!EndlessIDs.postInitFinished) {
|
||||
val trace = Thread.currentThread().getStackTrace()[3];
|
||||
if (trace.getMethodName().equals("updateBiomesFolder") &&
|
||||
trace.getClassName().equals("code.elix_x.coremods.antiidconflict.managers.BiomesManager")) {
|
||||
return EndlessIDs.fakeBiomeArray;
|
||||
}
|
||||
}
|
||||
return biomeList;
|
||||
}
|
||||
}
|
||||
-1
@@ -21,7 +21,6 @@ public abstract class BiomeDictionaryMixin {
|
||||
require = 1)
|
||||
private static void cleanupBiomeArray(CallbackInfo ci) {
|
||||
val biomes = BiomeGenBase.getBiomeGenArray();
|
||||
EndlessIDs.fakeBiomeArray = Arrays.copyOf(biomes, biomes.length);
|
||||
for (int i = 0; i < biomes.length; i++) {
|
||||
if (biomes[i] instanceof PlaceholderBiome) {
|
||||
biomes[i] = null;
|
||||
|
||||
@@ -61,7 +61,6 @@ public enum Mixin implements IMixin {
|
||||
//endregion Minecraft->client
|
||||
//endregion Minecraft
|
||||
//region AntiIDConflict->common
|
||||
AIDCBiomesGenBaseMixin(Side.COMMON, require(TargetedMod.ANTIIDCONFLICT), "antiidconflict.BiomeGenBaseMixin"),
|
||||
AIDCBiomesGenBasePlaceholderMixin(Side.COMMON, require(TargetedMod.ANTIIDCONFLICT),
|
||||
"antiidconflict.BiomeGenBasePlaceholderMixin"),
|
||||
//endregion AntiIDConflict->common
|
||||
|
||||
Reference in new issue
Block a user