Выстрел себе в ногу
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
|
import net.minecraftforge.eventbus.api.IEventBus
|
||||||
|
|
||||||
object MBlockColors {
|
object MBlockColors {
|
||||||
private const val DEFAULT_WATER_TINT: Int = 0x3F76E4;
|
private const val DEFAULT_WATER_TINT: Int = 0x3F76E4
|
||||||
|
|
||||||
private fun registerBlockColors(event: RegisterColorHandlersEvent.Block) {
|
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 (index == 0) {
|
||||||
if (light == null || pos == null) DEFAULT_WATER_TINT
|
if (light == null || pos == null)
|
||||||
BiomeColors.getAverageWaterColor(light!!, pos!!)
|
DEFAULT_WATER_TINT
|
||||||
|
else
|
||||||
|
BiomeColors.getAverageWaterColor(light, pos)
|
||||||
} else -1
|
} else -1
|
||||||
}, MBlocks.COBBLESTONE_GENERATOR)
|
}, MBlocks.COBBLESTONE_GENERATOR)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun registerItemColors(event: RegisterColorHandlersEvent.Item) {
|
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
|
if (index == 0) DEFAULT_WATER_TINT else -1
|
||||||
}, MBlocks.COBBLESTONE_GENERATOR)
|
}, MBlocks.COBBLESTONE_GENERATOR)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user