October 2014
Beginner to intermediate
285 pages
6h 24m
English
The basic recipe for a block object in Minecraft is listed in the Canary documentation under net.canarymod.api.world.blocks.Block.[31]
There are many interesting functions in a Block, and we won’t cover them all, but here are a few of the most useful and interesting things you can do to a block:
getLocation() returns the Location for this block. Only one block can exist at any location in the world, and every location contains a block, even if it’s just air.
getType() returns the BlockType this block is made of.
rightClick(Player player) simulates a right-click on the block. Useful for forcing changes to blocks like levers, buttons, and doors.
Let’s play with some blocks, Minecraft style.
Read now
Unlock full access