O'Reilly logo

Minecraft Mods Programming Absolute Beginner’s Guide by Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10. Store Information with Arrays

In This Chapter

Create an array

Set the size of an array

Give a value to an array element

Change the information in an array

Make multidimensional arrays

Sort an array

Computers are ideal for the storage, categorization, and study of information.

The most basic way that information is stored in a computer program is by putting it into a variable. So far, all the variables you’ve worked with have been a single item of information, such as a floating-point number or a string.

A list of Minecraft mobs near the player is an example of a larger collection of similar information. To keep track of a list of this kind, you can use arrays.

An array is a group of related variables that share the same type. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required