Alexdoru committed 2022-09-10 02:48:24 +02:00
1 parent 18edf6d803
commit 8e816214db
5 files changed
+15 -24

No files matched your search

@@ -83,7 +83,7 @@ public class NEEContainerDrawHandler {
if (this.isCraftingTerm || this.isPatternTerm) {
GuiRecipe gui = (GuiRecipe) event.gui;
IRecipeHandler currentHandler = gui.currenthandlers.get(gui.recipetype);
IRecipeHandler currentHandler = (IRecipeHandler) gui.currenthandlers.get(gui.recipetype);
if (NEECraftingHandler.isCraftingTableRecipe(currentHandler)) {
@@ -189,7 +189,7 @@ public class NEEContainerDrawHandler {
for (int i = 0; i < overlayButtons.size(); i++) {
GuiButton overlayButton = overlayButtons.get(i);
if (overlayButton.visible) {
IRecipeHandler handler = gui.currenthandlers.get(gui.recipetype);
IRecipeHandler handler = (IRecipeHandler) gui.currenthandlers.get(gui.recipetype);
int recipeIndex = -1;
if (isGtnhNei) {
try {
@@ -1,11 +1,11 @@
package com.github.vfyjxf.nee.container;
import appeng.api.storage.ITerminalHost;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.util.Platform;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerCraftConfirm;
public class WCTContainerCraftingConfirm extends ContainerCraftConfirm {
@@ -214,10 +214,7 @@ public class NEECraftingHelper implements IOverlayHandler {
if (gui instanceof GuiCraftingTerm) {
return slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix;
} else if (GuiUtils.isGuiWirelessCrafting(gui)) {
return slot instanceof net.p455w0rd.wirelesscraftingterminal.common.container.slot.SlotCraftingMatrix
|| slot
instanceof
net.p455w0rd.wirelesscraftingterminal.common.container.slot.SlotFakeCraftingMatrix;
return slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix;
}
return false;
}
@@ -274,7 +271,7 @@ public class NEECraftingHelper implements IOverlayHandler {
|| GuiUtils.isGuiWirelessCrafting(guiRecipe.firstGui);
if (isCraftingTerm || isPatternTerm) {
int recipesPerPage = 2;
IRecipeHandler handler = guiRecipe.currenthandlers.get(guiRecipe.recipetype);
IRecipeHandler handler = (IRecipeHandler) guiRecipe.currenthandlers.get(guiRecipe.recipetype);
if (isGtnhNei) {
try {
recipesPerPage = (int) ReflectionHelper.findMethod(
@@ -291,7 +288,7 @@ public class NEECraftingHelper implements IOverlayHandler {
Minecraft.getMinecraft().displayGuiScreen(guiRecipe.firstGui);
overlayHandler.overlayRecipe(
guiRecipe.firstGui,
guiRecipe.currenthandlers.get(guiRecipe.recipetype),
(IRecipeHandler) guiRecipe.currenthandlers.get(guiRecipe.recipetype),
recipe,
NEIClientUtils.shiftKey());
event.setCanceled(true);
@@ -88,13 +88,10 @@ public class IngredientTracker {
ReflectionHelper.findField(ItemRepo.class, "list").get(repo);
} else {
// wireless crafting terminal support
net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo repo =
(net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo)
ReflectionHelper.findField(GuiWirelessCraftingTerminal.class, "repo")
.get(termGui);
list = (IItemList<IAEItemStack>) ReflectionHelper.findField(
net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo.class, "list")
.get(repo);
ItemRepo repo = (ItemRepo) ReflectionHelper.findField(GuiWirelessCraftingTerminal.class, "repo")
.get(termGui);
list = (IItemList<IAEItemStack>)
ReflectionHelper.findField(ItemRepo.class, "list").get(repo);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
@@ -124,13 +121,10 @@ public class IngredientTracker {
}
} else {
// wireless crafting terminal support
net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo repo =
(net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo)
ReflectionHelper.findField(GuiWirelessCraftingTerminal.class, "repo")
.get(termGui);
for (IAEItemStack stack : (IItemList<IAEItemStack>) ReflectionHelper.findField(
net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo.class, "list")
.get(repo)) {
ItemRepo repo = (ItemRepo) ReflectionHelper.findField(GuiWirelessCraftingTerminal.class, "repo")
.get(termGui);
for (IAEItemStack stack : (IItemList<IAEItemStack>)
ReflectionHelper.findField(ItemRepo.class, "list").get(repo)) {
list.add(stack.copy());
}
}