mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
Cleanup (#253)
This commit is contained in:
1 parent
4a39cf4ece
commit
0df88f2305
63 files changed
+123
-187
No files matched your search
@@ -7,11 +7,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.item.IClickableInTerminal;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -109,7 +106,6 @@ public class CPacketLevelTerminalCommands implements IMessage {
|
||||
@Override
|
||||
public IMessage onMessage(CPacketLevelTerminalCommands message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
AEBaseContainer con = (AEBaseContainer) player.openContainer;
|
||||
switch (message.action) {
|
||||
case EDIT -> {
|
||||
TileEntity tile = DimensionManager.getWorld(message.dim)
|
||||
@@ -134,34 +130,7 @@ public class CPacketLevelTerminalCommands implements IMessage {
|
||||
message.side,
|
||||
originalGui);
|
||||
}
|
||||
case ENABLE -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case DISABLE -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case ENABLE_ALL -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case DISABLE_ALL -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,8 @@ public class CPacketTransferRecipe implements IMessage {
|
||||
}
|
||||
// using exists item to fill slot
|
||||
if (message.shift && !storageList.isEmpty()) {
|
||||
for (OrderStack stack : message.inputs) {
|
||||
for (@SuppressWarnings("rawtypes")
|
||||
OrderStack stack : message.inputs) {
|
||||
if (stack.getStack() instanceof FluidStack || stack.getItems() == null) continue;
|
||||
IAEItemStack iaeItemStack = AEApi.instance().storage()
|
||||
.createItemStack((ItemStack) stack.getStack());
|
||||
|
||||
Reference in new issue
Block a user