mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-18 02:15:05 +00:00
surround my dynamics
This commit is contained in:
4 files changed
+25
-6
No files matched your search
@@ -18,5 +18,6 @@ dependencies {
|
||||
compile(deobfMaven(curseMaven, "curse.maven:biomesoplenty-220318:2499612")) // 2.1.0.2308
|
||||
compile(deobfMaven(curseMaven, "curse.maven:rtg-237989:2521557")) // 1.1.1.7
|
||||
compile(deobfMaven(curseMaven, "curse.maven:naturescompass-252848:2451823")) // 1.3.1
|
||||
compile(deobfMaven(curseMaven, "curse.maven:dynamicsurrounding-238891:2642381")) // 1.0.6.4
|
||||
compileOnly(files("lib/GalacticraftCore-1.7-3.0.12.504-deobf.jar"))
|
||||
}
|
||||
+4
-2
@@ -23,8 +23,10 @@ public abstract class BiomeGenBasePlaceholderMixin {
|
||||
remap = false),
|
||||
require = 1)
|
||||
private int removePlaceholders(int id, boolean register) {
|
||||
if (biomeList[id] instanceof PlaceholderBiome) {
|
||||
biomeList[id] = null;
|
||||
if (register) {
|
||||
if (biomeList[id] instanceof PlaceholderBiome) {
|
||||
biomeList[id] = null;
|
||||
}
|
||||
}
|
||||
return AsmHooks.getBiomeID(id, register);
|
||||
}
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ public abstract class BiomeGenBaseMixin {
|
||||
@Inject(method = "<init>(IZ)V",
|
||||
at = @At(value = "RETURN"),
|
||||
require = 1)
|
||||
private void generatePlaceholders(int p_i1971_1_, boolean register, CallbackInfo ci) {
|
||||
if (((Object) this) instanceof PlaceholderBiome) {
|
||||
private void generatePlaceholders(int id, boolean register, CallbackInfo ci) {
|
||||
if (((Object) this) instanceof PlaceholderBiome || !register) {
|
||||
return;
|
||||
}
|
||||
if (biomeID >= 128 && biomeList[biomeID - 128] == null) {
|
||||
|
||||
+18
-2
@@ -7,6 +7,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
@@ -22,15 +23,30 @@ public abstract class BiomeGenBasePlaceholderMixin {
|
||||
@Final
|
||||
public int biomeID;
|
||||
|
||||
private static ThreadLocal<Boolean> wantsRegister;
|
||||
|
||||
@Redirect(method = "<init>(IZ)V",
|
||||
at = @At(value = "FIELD",
|
||||
opcode = Opcodes.PUTFIELD,
|
||||
target = "Lnet/minecraft/world/biome/BiomeGenBase;biomeID:I"),
|
||||
require = 1)
|
||||
private void removePlaceholders(BiomeGenBase instance, int id) {
|
||||
if (biomeList[id] instanceof PlaceholderBiome) {
|
||||
biomeList[id] = null;
|
||||
if (wantsRegister.get()) {
|
||||
if (biomeList[id] instanceof PlaceholderBiome) {
|
||||
biomeList[id] = null;
|
||||
}
|
||||
}
|
||||
biomeID = id;
|
||||
}
|
||||
|
||||
@ModifyVariable(method = "<init>(IZ)V",
|
||||
at = @At(value = "HEAD"),
|
||||
index = 2,
|
||||
require = 1,
|
||||
argsOnly = true)
|
||||
private static boolean modifyArg(boolean register) {
|
||||
if (wantsRegister == null) wantsRegister = new ThreadLocal<>();
|
||||
wantsRegister.set(register);
|
||||
return register;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user