23. Chop Down a Forest of Trees
In This Chapter
• Examine the blocks in a large area of the game world
• Find the block at an (x,y,z) location
• Discover trees by checking for blocks that hold logs
• Store locations that have been searched in an array list
• Avoid server lag by using less memory in a mod
• Create an inner class to represent an (x,y,z) location
• Use the programming technique of recursion
Minecraft mods that add a new command to the game all start with the same basic framework. You extend the JavaPlugin
class from the org.bukkit.plugin.java
package; store the player, world, and server in instance variables; and override the superclass method onCommand()
.
When the player enters a command, onCommand()
is called. If the command ...
Get Minecraft Mods Programming Absolute Beginner’s Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.