Fixed petal blocks having no color. Closes #1885

This commit is contained in:
Vasco Lavos committed 2016-09-18 18:09:49 +01:00
1 parent cd40817917
commit d2e79ca46f
1 file changed
+9
@@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.ItemColors;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemBlock;
@@ -69,6 +70,14 @@ public final class ColorHandler {
},
ModBlocks.spreader
);
// Petal Block
blocks.registerBlockColorHandler((state, world, pos, tintIndex) -> {
int meta = ModBlocks.petalBlock.getMetaFromState(state);
return EnumDyeColor.byMetadata(meta).getMapColor().colorValue;
},
ModBlocks.petalBlock
);
// Platforms
blocks.registerBlockColorHandler(