diff --git a/src/main/java/com/wynprice/secretroomsmod/core/SecretRoomsTransformer.java b/src/main/java/com/wynprice/secretroomsmod/core/SecretRoomsTransformer.java index 35c3d74..a1f7c2f 100644 --- a/src/main/java/com/wynprice/secretroomsmod/core/SecretRoomsTransformer.java +++ b/src/main/java/com/wynprice/secretroomsmod/core/SecretRoomsTransformer.java @@ -47,7 +47,7 @@ public class SecretRoomsTransformer implements IClassTransformer { AbstractInsnNode ins = methodNode.instructions.get(i); if(ins instanceof MethodInsnNode) { MethodInsnNode mIns = ((MethodInsnNode)ins); - if(mIns.getOpcode() == Opcodes.INVOKEVIRTUAL && (mIns.owner.equals("ChunkCacheOF")/*Needed so Optifine works with SRM*/ || mIns.owner.equals("net/minecraft/world/ChunkCache")) && mIns.name.equals(getName("getBlockState", "func_180495_p")) && mIns.desc.equals("(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/state/IBlockState;")) { + if(mIns.getOpcode() == Opcodes.INVOKEVIRTUAL && (mIns.owner.equals("ChunkCacheOF") || mIns.owner.equals("net/optifine/override/ChunkCacheOF")/*Needed so Optifine works with SRM*/ || mIns.owner.equals("net/minecraft/world/ChunkCache")) && mIns.name.equals(getName("getBlockState", "func_180495_p")) && mIns.desc.equals("(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/state/IBlockState;")) { methodNode.instructions.set(ins, new MethodInsnNode(Opcodes.INVOKESTATIC, "com/wynprice/secretroomsmod/core/SecretRoomsHooksClient", "getBlockState", "(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/state/IBlockState;", false)); return; }