// Create a chest at (i,j,k). world.setBlockWithNotify(i,j,k,Block.crate.blockID); // Get the crate entity TileEntityChest tileentitychest = (TileEntityChest)world.getBlockTileEntity(i,j,k); // Generate an item stack of ingot iron and stack up to 4 ItemStack itemstack = new ItemStack(Item.ingotIron, random.nextInt(4) + 1); // Add that stack to the chest tileentitychest.setInventorySlotContents(random.nextInt(tileentitychest.getSizeInventory()), itemstack);
What are the results?
No comments:
Post a Comment