Выстрел себе в ногу
This commit is contained in:
parent
23dc91fb55
commit
79c4e560b9
@ -9,19 +9,21 @@ import net.minecraftforge.client.event.RegisterColorHandlersEvent
|
||||
import net.minecraftforge.eventbus.api.IEventBus
|
||||
|
||||
object MBlockColors {
|
||||
private const val DEFAULT_WATER_TINT: Int = 0x3F76E4;
|
||||
private const val DEFAULT_WATER_TINT: Int = 0x3F76E4
|
||||
|
||||
private fun registerBlockColors(event: RegisterColorHandlersEvent.Block) {
|
||||
event.register({ state: BlockState?, light: BlockAndTintGetter?, pos: BlockPos?, index: Int ->
|
||||
event.register({ state: BlockState, light: BlockAndTintGetter?, pos: BlockPos?, index: Int ->
|
||||
if (index == 0) {
|
||||
if (light == null || pos == null) DEFAULT_WATER_TINT
|
||||
BiomeColors.getAverageWaterColor(light!!, pos!!)
|
||||
if (light == null || pos == null)
|
||||
DEFAULT_WATER_TINT
|
||||
else
|
||||
BiomeColors.getAverageWaterColor(light, pos)
|
||||
} else -1
|
||||
}, MBlocks.COBBLESTONE_GENERATOR)
|
||||
}
|
||||
|
||||
private fun registerItemColors(event: RegisterColorHandlersEvent.Item) {
|
||||
event.register({ stack: ItemStack?, index: Int ->
|
||||
event.register({ stack: ItemStack, index: Int ->
|
||||
if (index == 0) DEFAULT_WATER_TINT else -1
|
||||
}, MBlocks.COBBLESTONE_GENERATOR)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user