tutorial:biomecoloring
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:biomecoloring [2019/03/25 01:45] – language fixes draylar | tutorial:biomecoloring [2019/11/16 20:44] (current) – removed fudge | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Block Biome Coloring ====== | ||
- | In this tutorial, we will look at adding biome-dependent colors to new blocks. Remember to keep visual-related logic client-side, | ||
- | | ||
- | @Override | ||
- | public void onInitializeClient() { | ||
- | | ||
- | | ||
- | | ||
- | }, block); | ||
- | } | ||
- | } | ||
- | |||
- | So, what's happening here? The register method wants a color returned, and in this case, that color is taken from the grass block. Coloring an item is very similar. Like blocks, the returned color could be any, but we'll once again use grass blocks for the example. | ||
- | |||
- | | ||
- | @Override | ||
- | public void onInitializeClient() { | ||
- | | ||
- | // These values are represented as temperature and humidity, and used as coordinates for the color map | ||
- | | ||
- | | ||
- | | ||
- | }, block.getItem()); | ||
- | } | ||
- | } | ||
- | |||
- | Finished! |
tutorial/biomecoloring.1553478329.txt.gz · Last modified: 2019/03/25 01:45 by draylar