October 2014
Beginner to intermediate
285 pages
6h 24m
English
You can use several functions to spawn different entities and creatures, as well as game objects—like an Ender Pearl.[32] To create new things in the world, we’ll use functions defined in our EZPlugin helper instead of writing out all the code directly. It’s not that the code is particularly complicated or hard to understand; it’s just that these couple of lines of code will always be the same, so it makes sense to use a helper function. That way you only need to use the one-line helper function call, instead of using several lines of duplicated code. Let’s take a close look at what those helper functions actually do.
Here’s the method we’ve been using to spawn cows, squid, and such:
| EZPlugin/src/com/pragprog/ahmine/ez/EZPlugin.java ... |
Read now
Unlock full access