Class BlendedBlockColorEvent

java.lang.Object
net.neoforged.bus.api.Event
com.petrolpark.client.rendering.world.BlendedBlockColorEvent

public class BlendedBlockColorEvent extends net.neoforged.bus.api.Event
BlockColors are called after Biome blending has been done. This event is fired on the NeoForge.EVENT_BUS on the client side to allow Block colors to be modified before they are blended.

It is not fired on the main thread.

The result of this event is cached but can be reset with ColorHelper.refreshChunkColors(ChunkPos).

This event will be fired many times for every block in a chunk, so it is recommended to cache intermediate values.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.world.level.biome.Biome
     
    protected int
     
    protected final net.minecraft.world.level.ColorResolver
     
    protected final net.minecraft.client.multiplayer.ClientLevel
     
    protected final net.minecraft.core.BlockPos
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlendedBlockColorEvent(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.biome.Biome biome, net.minecraft.world.level.ColorResolver colorResolver, int color)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.biome.Biome
     
    int
     
    net.minecraft.world.level.ColorResolver
     
    net.minecraft.client.multiplayer.ClientLevel
     
    net.minecraft.core.BlockPos
     
    void
    setColor(int color)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • level

      protected final net.minecraft.client.multiplayer.ClientLevel level
    • pos

      protected final net.minecraft.core.BlockPos pos
    • biome

      protected final net.minecraft.world.level.biome.Biome biome
    • colorResolver

      protected final net.minecraft.world.level.ColorResolver colorResolver
    • color

      protected int color
  • Constructor Details

    • BlendedBlockColorEvent

      public BlendedBlockColorEvent(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.biome.Biome biome, net.minecraft.world.level.ColorResolver colorResolver, int color)
  • Method Details

    • getLevel

      public net.minecraft.client.multiplayer.ClientLevel getLevel()
    • getPos

      public net.minecraft.core.BlockPos getPos()
    • getBiome

      public net.minecraft.world.level.biome.Biome getBiome()
    • getColorResolver

      public net.minecraft.world.level.ColorResolver getColorResolver()
    • getColor

      public int getColor()
    • setColor

      public void setColor(int color)