Fixed filters so that they would send a block update to the inventories when updated. Also nerfed the bound sword.

This commit is contained in:
WayofTime 2016-02-19 19:47:58 -05:00
parent a88d7f43b8
commit b3636fe12f
2 changed files with 16 additions and 2 deletions

View file

@ -5,7 +5,10 @@ import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import WayofTime.bloodmagic.util.Utils;
/**
@ -72,6 +75,11 @@ public class DefaultItemFilter implements IItemFilter
testStack = inputStack.copy();
testStack.stackSize -= changeAmount;
TileEntity tile = (TileEntity) accessedInventory;
World world = tile.getWorld();
BlockPos pos = tile.getPos();
world.markBlockForUpdate(pos);
return testStack;
}
@ -124,6 +132,11 @@ public class DefaultItemFilter implements IItemFilter
continue;
}
TileEntity tile = (TileEntity) accessedInventory;
World world = tile.getWorld();
BlockPos pos = tile.getPos();
world.markBlockForUpdate(pos);
inputStack.stackSize -= changeAmount;
maxTransfer -= changeAmount;