mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-08 12:34:46 +00:00
Rollback PR#913 (#916)
This commit is contained in:
1 parent
bd17301cb9
commit
5dfcff6f30
2 files changed
+5
-26
No files matched your search
@@ -32,7 +32,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainerCreative;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -273,18 +272,8 @@ public class NEIClientUtils extends NEIServerUtils {
|
||||
given += qty;
|
||||
if (given >= stack.stackSize) break;
|
||||
}
|
||||
if (given > 0) {
|
||||
if (mc().currentScreen instanceof GuiContainerCreative gcc) {
|
||||
mc().thePlayer.inventory.addItemStackToInventory(stack);
|
||||
gcc.inventorySlots.detectAndSendChanges();
|
||||
} else NEICPH.sendGiveItem(copyStack(typestack, given), false, false);
|
||||
}
|
||||
} else {
|
||||
if (mc().currentScreen instanceof GuiContainerCreative gcc) {
|
||||
mc().thePlayer.inventory.addItemStackToInventory(stack);
|
||||
gcc.inventorySlots.detectAndSendChanges();
|
||||
} else NEICPH.sendGiveItem(stack, infinite, true);
|
||||
}
|
||||
if (given > 0) NEICPH.sendGiveItem(copyStack(typestack, given), false, false);
|
||||
} else NEICPH.sendGiveItem(stack, infinite, true);
|
||||
} else {
|
||||
for (int given = 0; given < stack.stackSize;) {
|
||||
int qty = Math.min(stack.stackSize - given, stack.getMaxStackSize());
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import static com.gtnewhorizon.gtnhlib.ClientProxy.mc;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainerCreative;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -33,16 +30,9 @@ public class CheatItemHandler extends INEIGuiAdapter {
|
||||
.min(contents + add, Math.min(overSlot.getSlotStackLimit(), draggedStack.getMaxStackSize()));
|
||||
|
||||
if (total > contents) {
|
||||
if (mc.currentScreen instanceof GuiContainerCreative gcc) {
|
||||
mc.thePlayer.inventory.addItemStackToInventory(draggedStack);
|
||||
gcc.inventorySlots.detectAndSendChanges();
|
||||
} else {
|
||||
NEIClientUtils.setSlotContents(
|
||||
overSlot.slotNumber,
|
||||
NEIServerUtils.copyStack(draggedStack, total),
|
||||
true);
|
||||
NEICPH.sendGiveItem(NEIServerUtils.copyStack(draggedStack, total), false, false);
|
||||
}
|
||||
NEIClientUtils
|
||||
.setSlotContents(overSlot.slotNumber, NEIServerUtils.copyStack(draggedStack, total), true);
|
||||
NEICPH.sendGiveItem(NEIServerUtils.copyStack(draggedStack, total), false, false);
|
||||
draggedStack.stackSize -= total - contents;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user