Fix desync of FilteringBehaviour

This commit is contained in:
Snownee 2021-01-26 18:00:47 +08:00
parent 8f7945ff4e
commit b958be0712

View File

@ -75,12 +75,12 @@ public class FilteringHandler {
if (event.getSide() != LogicalSide.CLIENT) {
if (!player.isCreative()) {
if (behaviour.getFilter()
.getItem() instanceof FilterItem)
player.inventory.placeItemBackInInventory(world, behaviour.getFilter());
if (toApply.getItem() instanceof FilterItem)
player.getHeldItem(hand)
.shrink(1);
if (behaviour.getFilter()
.getItem() instanceof FilterItem)
player.inventory.placeItemBackInInventory(world, behaviour.getFilter());
}
if (toApply.getItem() instanceof FilterItem)
toApply.setCount(1);