|
45 | 45 | import org.objectweb.asm.tree.MethodNode; |
46 | 46 | import org.objectweb.asm.tree.VarInsnNode; |
47 | 47 |
|
| 48 | +import net.minecraft.launchwrapper.Launch; |
| 49 | + |
48 | 50 | import java.util.ArrayList; |
| 51 | +import java.util.Arrays; |
49 | 52 | import java.util.List; |
50 | 53 | import java.util.Objects; |
51 | 54 | import java.util.function.BiFunction; |
@@ -186,22 +189,28 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer { |
186 | 189 | private static final BytePatternMatcher getBiomeArrayMethodMatcher; |
187 | 190 |
|
188 | 191 | static { |
| 192 | + var chunk = new ArrayList<String>(4); |
189 | 193 | if (EndlessIDsCore.deobfuscated) { |
190 | 194 | CLASS_BiomeGenBase = new String[]{"net/minecraft/world/biome/BiomeGenBase"}; |
191 | 195 | CLASS_IChunkProvider = new String[]{"net/minecraft/world/chunk/IChunkProvider"}; |
192 | 196 | CLASS_ChunkProviderGenerate = new String[]{"net/minecraft/world/gen/ChunkProviderGenerate"}; |
193 | | - CLASS_Chunk = new String[]{"net/minecraft/world/chunk/Chunk"}; |
| 197 | + chunk.add("net/minecraft/world/chunk/Chunk"); |
194 | 198 | FIELD_biomeID = new String[]{"biomeID"}; |
195 | 199 | METHOD_getBiomeArray = new String[]{"getBiomeArray"}; |
196 | 200 | } else { |
197 | 201 | CLASS_BiomeGenBase = new String[]{"ahu", "net/minecraft/world/biome/BiomeGenBase"}; |
198 | 202 | CLASS_IChunkProvider = new String[]{"apu", "net/minecraft/world/chunk/IChunkProvider"}; |
199 | 203 | CLASS_ChunkProviderGenerate = new String[]{"aqz", "net/minecraft/world/gen/ChunkProviderGenerate"}; |
200 | | - CLASS_Chunk = new String[]{"apx", "net/minecraft/world/chunk/Chunk"}; |
| 204 | + chunk.add("apx"); |
| 205 | + chunk.add("net/minecraft/world/chunk/Chunk"); |
201 | 206 | FIELD_biomeID = new String[]{"ay", "field_76756_M"}; |
202 | 207 | METHOD_getBiomeArray = new String[]{"m", "func_76605_m"}; |
203 | 208 | } |
204 | | - |
| 209 | + val chunkExtraSpool = Launch.blackboard.get("endlessids_spool_CLASS_Chunk_interop"); |
| 210 | + if (chunkExtraSpool instanceof String[]) { |
| 211 | + chunk.addAll(Arrays.asList((String[]) chunkExtraSpool)); |
| 212 | + } |
| 213 | + CLASS_Chunk = chunk.toArray(new String[0]); |
205 | 214 | chunkClassMatcher = new BytePatternMatcher(CLASS_Chunk, BytePatternMatcher.Mode.Equals); |
206 | 215 | getBiomeArrayMethodMatcher = new BytePatternMatcher(METHOD_getBiomeArray, BytePatternMatcher.Mode.Equals); |
207 | 216 | } |
|
0 commit comments