Storage Drawers: Forestry Pack

Storage Drawers: Forestry Pack

6M Downloads

[3.2.4] Compacting drawer doesn't update front properly

Belgabor opened this issue ยท 1 comments

commented

Came across this while updating my code, I thought it was my fault at first, but the compacting drawer does it as well =)
If you insert something that has multiple stages into an empty compacting drawer the front texture doesn't update properly, it still shows the darker lower slots.

For my code I fixed it like this, not sure if it's the best solution, but it works:

    private void populateSlot (int slot, ItemStack stack, int conversion) {
        convRate[slot] = conversion;
        protoStack[slot] = stack==null?null:stack.copy();
        //centralInventory.setStoredItem(slot, stack, 0);
        //getDrawer(slot).setStoredItem(stack, 0);
        if (worldObj != null && !worldObj.isRemote) {
            IBlockState state = worldObj.getBlockState(getPos());
            worldObj.notifyBlockUpdate(getPos(), state, state, 3);
        }
    }
commented

Fixed in 3.4.2. Your recommended code is a pretty good place for the fix.