mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 07:47:55 +00:00
remove me io asm
This commit is contained in:
1 parent
8a99073d40
commit
949eefb873
3 files changed
-68
No files matched your search
@@ -32,9 +32,6 @@ public class FCClassTransformer implements IClassTransformer {
|
||||
case "appeng.integration.modules.NEI":
|
||||
tform = NEITransfermer.INSTANCE;
|
||||
break;
|
||||
case "appeng.tile.storage.TileIOPort":
|
||||
tform = TitleIOPortTransformer.INSTANCE;
|
||||
break;
|
||||
case "appeng.core.features.registries.ExternalStorageRegistry":
|
||||
tform = ExternalStorageRegistryTransformer.INSTANCE;
|
||||
break;
|
||||
|
||||
@@ -7,7 +7,6 @@ import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.IMachineSet;
|
||||
import appeng.api.networking.storage.IStorageGrid;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.crafting.MECraftingInventory;
|
||||
@@ -20,7 +19,6 @@ import com.glodblock.github.client.gui.GuiFluidCraftConfirm;
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.common.parts.PartFluidInterface;
|
||||
import com.glodblock.github.common.storage.FluidCellInventory;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor;
|
||||
import com.glodblock.github.inventory.FluidConvertingInventoryCrafting;
|
||||
@@ -185,10 +183,4 @@ public class CoreModHooks {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static long IOPortMinSpeed(long possible, long itemsToMove, final StorageChannel chan) {
|
||||
return chan == StorageChannel.FLUIDS
|
||||
? Math.min(possible, itemsToMove * FluidCellInventory.singleByteAmount)
|
||||
: Math.min(possible, itemsToMove);
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.glodblock.github.coremod.transform;
|
||||
|
||||
import com.glodblock.github.coremod.FCClassTransformer;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
public class TitleIOPortTransformer extends FCClassTransformer.ClassMapper {
|
||||
public static final TitleIOPortTransformer INSTANCE = new TitleIOPortTransformer();
|
||||
|
||||
private TitleIOPortTransformer() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
|
||||
return new TitleIOPortTransformer.TransformTitleIOPort(Opcodes.ASM5, downstream);
|
||||
}
|
||||
|
||||
private static class TransformTitleIOPort extends ClassVisitor {
|
||||
|
||||
TransformTitleIOPort(int api, ClassVisitor cv) {
|
||||
super(api, cv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
if (name.equals("transferContents")) {
|
||||
return new TitleIOPortTransformer.TransformTransferContents(
|
||||
api, super.visitMethod(access, name, desc, signature, exceptions));
|
||||
}
|
||||
return super.visitMethod(access, name, desc, signature, exceptions);
|
||||
}
|
||||
}
|
||||
|
||||
private static class TransformTransferContents extends MethodVisitor {
|
||||
|
||||
TransformTransferContents(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
|
||||
if (opcode == Opcodes.INVOKESTATIC && owner.equals("java/lang/Math") && name.equals("min")) {
|
||||
super.visitVarInsn(Opcodes.ALOAD, 6);
|
||||
super.visitMethodInsn(
|
||||
Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"IOPortMinSpeed",
|
||||
"(JJLappeng/api/storage/StorageChannel;)J",
|
||||
false);
|
||||
} else {
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user