mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
remove asm
This commit is contained in:
1 parent
b1dff2ec2c
commit
3715e470aa
2 files changed
+2
-28
No files matched your search
@@ -187,12 +187,6 @@ public class CoreModHooks {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void updateFluidTag(ItemStack whatToSend, ItemStack Result) {
|
||||
if (Result != null && Result.getItem() instanceof ItemFluidPacket) {
|
||||
whatToSend.setTagCompound(Result.getTagCompound());
|
||||
}
|
||||
}
|
||||
|
||||
public static long IOPortMinSpeed(long possible, long itemsToMove, final StorageChannel chan) {
|
||||
return chan == StorageChannel.FLUIDS
|
||||
? Math.min(possible, itemsToMove * FluidCellInventory.singleByteAmount)
|
||||
|
||||
+2
-22
@@ -31,7 +31,7 @@ public class DualityInterfaceTransformer extends FCClassTransformer.ClassMapper
|
||||
case "pushPattern":
|
||||
case "isBusy":
|
||||
return new TransformInvAdaptorCalls(
|
||||
api, super.visitMethod(access, name, desc, signature, exceptions), name);
|
||||
api, super.visitMethod(access, name, desc, signature, exceptions));
|
||||
default:
|
||||
return super.visitMethod(access, name, desc, signature, exceptions);
|
||||
}
|
||||
@@ -39,29 +39,9 @@ public class DualityInterfaceTransformer extends FCClassTransformer.ClassMapper
|
||||
}
|
||||
|
||||
private static class TransformInvAdaptorCalls extends MethodVisitor {
|
||||
private final String name;
|
||||
private int const_1 = 0;
|
||||
|
||||
private TransformInvAdaptorCalls(int api, MethodVisitor mv, String name) {
|
||||
private TransformInvAdaptorCalls(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
|
||||
super.visitFieldInsn(opcode, owner, name, desc);
|
||||
if (this.name.equals("pushItemsOut") && opcode == Opcodes.PUTFIELD && const_1 == 0) {
|
||||
// update fluid tag
|
||||
super.visitVarInsn(Opcodes.ALOAD, 5);
|
||||
super.visitVarInsn(Opcodes.ALOAD, 10);
|
||||
super.visitMethodInsn(
|
||||
Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"updateFluidTag",
|
||||
"(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V",
|
||||
false);
|
||||
const_1++;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user