mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
test
This commit is contained in:
1 parent
2b8c983e8a
commit
c3fec4fd26
5 files changed
+86
-3
No files matched your search
+1
-1
@@ -644,7 +644,7 @@ boolean performBuildScriptUpdate(String projectDir) {
|
||||
}
|
||||
|
||||
boolean isNewBuildScriptVersionAvailable(String projectDir) {
|
||||
Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
|
||||
Map parameters = ["connectTimeout": 5000, "readTimeout": 5000]
|
||||
|
||||
String currentBuildScript = getFile("build.gradle").getText()
|
||||
String currentBuildScriptHash = getVersionHash(currentBuildScript)
|
||||
|
||||
@@ -49,6 +49,8 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
private GuiButton selectCPU;
|
||||
private int tooltip = -1;
|
||||
|
||||
private ItemStack hoveredStack;
|
||||
|
||||
public GuiFluidCraftConfirm(final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerFluidCraftConfirm( inventoryPlayer, te ) );
|
||||
@@ -202,7 +204,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
hoveredStack = null;
|
||||
final int offY = 23;
|
||||
|
||||
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
|
||||
@@ -324,6 +326,8 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
|
||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||
toolPosY = y * offY + yo;
|
||||
|
||||
hoveredStack = is;
|
||||
}
|
||||
|
||||
this.drawItem( posX, posY, is );
|
||||
@@ -550,5 +554,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
lineList.add(GuiText.HoldShiftForTooltip.getLocal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getHoveredStack() {
|
||||
return hoveredStack;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,9 @@ public class FCClassTransformer implements IClassTransformer {
|
||||
case "net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftConfirm":
|
||||
tform = GuiCraftingTransformer.INSTANCE;
|
||||
break;
|
||||
case "appeng.integration.modules.NEI":
|
||||
tform = NEITransfermer.INSTANCE;
|
||||
break;
|
||||
default:
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,15 @@ import appeng.api.networking.storage.IStorageGrid;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.implementations.GuiCraftConfirm;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.crafting.MECraftingInventory;
|
||||
import appeng.me.MachineSet;
|
||||
import appeng.me.cluster.implementations.CraftingCPUCluster;
|
||||
import appeng.parts.misc.PartInterface;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
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;
|
||||
@@ -26,6 +29,7 @@ import com.glodblock.github.util.Ae2Reflect;
|
||||
import com.glodblock.github.util.SetBackedMachineSet;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.Sets;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -158,4 +162,15 @@ public class CoreModHooks {
|
||||
Ae2Reflect.markCPUDirty(instance);
|
||||
}
|
||||
|
||||
public ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) {
|
||||
if (gui instanceof GuiCraftConfirm){
|
||||
return ((GuiCraftConfirm)gui).getHoveredStack();
|
||||
} else if (gui instanceof GuiFluidCraftConfirm) {
|
||||
return ((GuiFluidCraftConfirm)gui).getHoveredStack();
|
||||
} else if (gui instanceof GuiCraftingCPU){
|
||||
return ((GuiCraftingCPU)gui).getHoveredStack();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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;
|
||||
|
||||
import static org.objectweb.asm.Opcodes.ACC_SUPER;
|
||||
|
||||
|
||||
public class NEITransfermer extends FCClassTransformer.ClassMapper{
|
||||
|
||||
public static final NEITransfermer INSTANCE = new NEITransfermer();
|
||||
|
||||
private NEITransfermer(){}
|
||||
|
||||
@Override
|
||||
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
|
||||
return new NEITransfermer.TransformNEI(Opcodes.ASM5, downstream);
|
||||
}
|
||||
private static class TransformNEI extends ClassVisitor {
|
||||
|
||||
TransformNEI(int api, ClassVisitor cv) {
|
||||
super(api, cv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
if ("getStackUnderMouse".equals(name)) {
|
||||
return new NEITransfermer.TransformUnderMouse(api, super.visitMethod(access, name, desc, signature, exceptions));
|
||||
}
|
||||
return super.visitMethod(access, name, desc, signature, exceptions);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TransformUnderMouse extends MethodVisitor {
|
||||
|
||||
TransformUnderMouse(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
|
||||
if (opcode == Opcodes.INVOKEINTERFACE) {
|
||||
// super.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
|
||||
// "com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
// "getStackUnderMouse",
|
||||
// "(Lnet/minecraft/client/gui/inventory/GuiContainer;II)Lnet/minecraft/item/ItemStack;",
|
||||
// false);
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
else {
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user