Fixed duplication bug with filter slots. Fixes #1982

This commit is contained in:
raoulvdberge
2018-09-11 14:45:08 +02:00
parent 6db8b7e5fb
commit eef99eed11
3 changed files with 15 additions and 1 deletions

View File

@@ -143,6 +143,15 @@ public abstract class ContainerBase extends Container {
return true;
}
@Override
public boolean canMergeSlot(ItemStack stack, Slot slot) {
if (slot instanceof SlotFilter || slot instanceof SlotFilterFluid || slot instanceof SlotLegacyFilter) {
return false;
}
return super.canMergeSlot(stack, slot);
}
protected boolean isHeldItemDisabled() {
return false;
}

View File

@@ -250,7 +250,11 @@ public class ContainerGrid extends ContainerBase {
@Override
public boolean canMergeSlot(ItemStack stack, Slot slot) {
return (slot == craftingResultSlot || slot == patternResultSlot) ? false : super.canMergeSlot(stack, slot);
if (slot == craftingResultSlot || slot == patternResultSlot) {
return false;
}
return super.canMergeSlot(stack, slot);
}
@Override