Demo Code#
Some example code that uses the MCIWB library.
demo
#
demo.gate
#
Define a castle gateway with portcullis
demo.shapes
#
Functions to make some shapes in the world
demo.pagoda
#
- demo.pagoda.build_pagoda(pos, width=4, floor_height=4, item: Item = Item.GOLD_BLOCK)[source]#
Create a pagoda out of blocks at the given position.
Each successive floor is narrower and each has a balcony at the top.
- Parameters:
pos – position of the base of the pagoda
width – width of the base of the pagoda
floor_height – height of each floor
item – block to use for the base of the pagoda
demo.follow
#
demo.background
#
Demonstrate the use of Monitor to set up a number of background threads to monitor the world and respond to player movement.