Fixed duplication bug with filter slots. Fixes #1982
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user