Compare commits

...
1 Commits
Author SHA1 Message Date
repo-alt cad0646a2a Wireless crafting terminal crash game when placed inside own crafting grid (#3)
* Wireless crafting terminal crash game when placed inside own crafting grid
https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6296
2021-01-01 18:01:46 +03:00
2 changed files with 8 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
aeversion=rv3
wctchannel=
wctbuild=1.8.7.6
wctbuild=1.8.7.7-GTNH
wctgroup=net.p455w0rd.wirelesscraftingterminal
wctbasename=WirelessCraftingTerminal
@@ -53,6 +53,8 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.p455w0rd.wirelesscraftingterminal.api.WCTApi;
import net.p455w0rd.wirelesscraftingterminal.client.gui.widgets.GuiScrollbar;
import net.p455w0rd.wirelesscraftingterminal.client.gui.widgets.GuiTabButton;
import net.p455w0rd.wirelesscraftingterminal.client.gui.widgets.GuiTrashButton;
@@ -922,9 +924,12 @@ public class GuiWirelessCraftingTerminal extends GuiContainer implements ISortSo
final List<Slot> slots = this.getInventorySlots();
for (final Slot s : slots) {
if (s.getSlotIndex() == j && s.inventory == ((ContainerWirelessCraftingTerminal) this.inventorySlots).getPlayerInv()) {
if (!s.canTakeStack(((ContainerWirelessCraftingTerminal) this.inventorySlots).getPlayerInv().player)) {
if (s.getStack() != null && s.getStack().getItem() == WCTApi.instance().items().WirelessCraftingTerminal.getItem())
return false;
if (!s.canTakeStack(((ContainerWirelessCraftingTerminal) this.inventorySlots).getPlayerInv().player))
return false;
}
else
break;
}
}