tutorial:biomecoloring
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:biomecoloring [2019/02/19 14:20] – ↷ Page name changed from tutorial:biomecolouring to tutorial:biomecoloring mcrafterzz | tutorial:biomecoloring [2019/03/25 03:22] – draylar | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Block Biome Coloring ====== | ====== Block Biome Coloring ====== | ||
- | In this tutorial we will show how to make blocks get affected by the biome colour similar | + | In this tutorial, we'll look at adding |
+ | |||
+ | Remember to keep visual-related logic client-side, (// | ||
| | ||
Line 8: | Line 10: | ||
| | ||
| | ||
- | | + | |
} | } | ||
} | } | ||
- | So what's happening here? Well, the register method wants a color returned and in this case that color is taken from the grass block, using the method' | + | So, what's happening here? The register method wants a color returned, and in this case, that color is taken from the grass block. |
| | ||
Line 18: | Line 20: | ||
public void onInitializeClient() { | public void onInitializeClient() { | ||
| | ||
- | | + | // These values are represented as temperature and humidity, and used as coordinates for the color map |
- | | + | |
+ | | ||
+ | return GrassColorHandler.getColor(temperature, humidity); | ||
+ | | ||
} | } | ||
} | } | ||
- | 0.5D is the temperature and 1D is the humidity of the biome. | + | Finished! |