mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 01:55:15 +00:00
Fixed petal blocks having no color. Closes #1885
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user