AdvancedPowerManagement icon indicating copy to clipboard operation
AdvancedPowerManagement copied to clipboard

Make Storage Monitor display the type of block being monitored

Open Tallinu opened this issue 13 years ago • 3 comments

Add another display window above the current / max energy that shows the name of the linked device. Possible? Easy / difficult? If it's an IInventory, getInvName() should work... Could display 'unknown' otherwise? Or figure out how to use the language registry to query for the raw tile entity's class name... That should always give a translated string.

Tallinu avatar Nov 03 '12 05:11 Tallinu

Looking into how feasible this is

pantheis avatar Nov 09 '12 16:11 pantheis

Try getPickBlock, since you have the coordinates. That's what I did for LiquidUU's accelerator to display the connected machine (and it was especially entertaining when it was displaying "Connected Machine: Chest"):

    public ItemStack getConnectedMachineItem() {
        TileEntity te = getConnectedMachine();
        if(te == null) {
            return null;
        }

        int machineId = worldObj.getBlockId(te.xCoord, te.yCoord, te.zCoord);
        Block machineBlock = Block.blocksList[machineId];

        return machineBlock.getPickBlock(null, worldObj, te.xCoord, te.yCoord, te.zCoord);
    }

narc0tiq avatar Nov 27 '12 22:11 narc0tiq

Thanks for the idea! Going to look into that soon.

Tallinu avatar Nov 27 '12 22:11 Tallinu