User Tools

Site Tools


tutorial:biomecoloring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:biomecoloring [2019/03/25 01:46] – block is not a reference usable draylartutorial:biomecoloring [2019/03/25 03:19] – clarification on block model tintindex draylar
Line 1: Line 1:
 ====== Block Biome Coloring ====== ====== 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, (//onInitializeClient//) or it will crash on a server. To register a custom block coloring, use //ColorProviderRegistry.BLOCK.register//, and for items, use //ColorProviderRegistry.ITEM.register//. In this tutorial, the grass biome color will be the one used.+In this tutorial, we'll look at adding biome-dependent colors to new blocks. To start, you'll need a block with a model that accounts for tintindex. To see an example of this, view the base leaves or grass_block model file.  
 + 
 +Remember to keep visual-related logic client-side, (//onInitializeClient//) or it will crash on a server. To register a custom block coloring, use //ColorProviderRegistry.BLOCK.register//, and for items, use //ColorProviderRegistry.ITEM.register//. In this tutorial, the grass biome color will be the one used.
  
    public class ExampleModClient implements ClientModInitializer {    public class ExampleModClient implements ClientModInitializer {