Fix reobfuscate

master
mckuhei 6 months ago
parent d2507e049d
commit bfcd5c92fa

@ -26,12 +26,12 @@ public class Constants {
try { try {
for(Field f : cls.getDeclaredFields()) { for(Field f : cls.getDeclaredFields()) {
// unsafe.putBoolean(cls, unsafe.fieldOffset(f), Boolean.getBoolean(cls.getName() + "." + f.getName())); // unsafe.putBoolean(cls, unsafe.fieldOffset(f), Boolean.getBoolean(cls.getName() + "." + f.getName()));
f.setBoolean(null, Boolean.getBoolean(cls.getName() + "." + f.getName())); f.setBoolean(null, Boolean.getBoolean("net.minecraft.src.Constants." + f.getName()));
} }
} catch(Throwable t) { } catch(Throwable t) {
throw new RuntimeException(t); throw new RuntimeException(t);
} }
if(System.getProperty(cls.getName() + ".USE_64BIT_PERLIN_GENERATOR") != null) { if(System.getProperty("net.minecraft.src.Constants.USE_64BIT_PERLIN_GENERATOR") != null) {
System.err.println("USE_64BIT_PERLIN_GENERATOR is deprecated and will remove in future, Please consider use -Dnet.minecraft.src.NoiseGeneratorOctaves.noiseType=" + (USE_64BIT_PERLIN_GENERATOR ? "long" : "int") + "Type"); System.err.println("USE_64BIT_PERLIN_GENERATOR is deprecated and will remove in future, Please consider use -Dnet.minecraft.src.NoiseGeneratorOctaves.noiseType=" + (USE_64BIT_PERLIN_GENERATOR ? "long" : "int") + "Type");
} }
} }

@ -3,6 +3,8 @@ package net.minecraft.src;
public abstract class NoiseGenerator public abstract class NoiseGenerator
{ {
public void populateNoiseArray(double[] par1ArrayOfDouble, double par2, double par4, double par6, int par8, int par9, int par10, double par11, double par13, double par15, double par17) { public void populateNoiseArray(double[] par1ArrayOfDouble, double par2, double par4, double par6, int par8, int par9, int par10, double par11, double par13, double par15, double par17) {
if (this instanceof NoiseGeneratorPerlin) {
((NoiseGeneratorPerlin) this).populateNoiseArray(par1ArrayOfDouble, par2, par4, par6, par8, par9, par10, par11, par13, par15, par17);
} else throw new Error("Fucked by MCP™");
} }
} }

Loading…
Cancel
Save