Populating Hoppers

Discussion in 'CraftScripts' started by kpbadger, May 21, 2014.

  1. kpbadger

    kpbadger New Member

    I am writing a craftscript to build an item sorter, for which the "hopper" is needed.

    I am able to create and orient the hopper with code such as the following:

    Code (Text):
    var hopper1 = new BaseBlock(BlockID.HOPPER, 0x0);
    var hopper1pos = new Vector(x, y, z);
    session.setBlock(hopper1pos, hopper);
    I am unable to call "setItems" on the hopper, because it doesn't inherit from ContainerBlock. The existing classes like ChestBlock, DispenserBlock, etc., all hard-code the block ID into the class, so I can't use those to make a hopper. So it seems that the only way to populate the hopper would be to have a new class HopperBlock that extends ContainerBlock.

    Am I missing something? If not, is this planned?