Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.wrap("left")
- w=p.getWorld(0)
- print("ID:")
- itemid=tonumber(read())
- print("META:")
- meta=tonumber(read())
- print("X:")
- x=tonumber(read())
- print("Y:")
- y=tonumber(read())
- print("Z:")
- z=tonumber(read())
- -- Create a chest
- w.setBlock(x, y, z, 54, 0)
- -- Get an NBT table representing the contents of the chest
- local te = w.getTileEntity(x, y, z)
- local nbt = readTileNBT(te)
- -- Add a stack of bedrock in slot 0
- table.insert(nbt.value.Items.value, {type="compound", value={id={type="short", value=itemid}, Count={type="byte", value=64}, Damage={type="short", value=0}, Slot={type="byte", value=0}}})
- writeTileNBT(te, nbt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement