Make Container.mergeItemStack respect Slot.isValidItem Closes #1630

This commit is contained in:
Lex Manos 2015-02-23 02:03:52 -08:00
parent f16a7ff890
commit b2ca559851
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/inventory/Container.java
+++ ../src-work/minecraft/net/minecraft/inventory/Container.java
@@ -624,7 +624,7 @@
slot = (Slot)this.field_75151_b.get(k);
itemstack1 = slot.func_75211_c();
- if (itemstack1 == null)
+ if (itemstack1 == null && slot.func_75214_a(p_75135_1_)) // Forge: Make sure to respect isItemValid in the slot.
{
slot.func_75215_d(p_75135_1_.func_77946_l());
slot.func_75218_e();