Search in sources :

Example 6 with LaserColor

use of pl.asie.charset.api.laser.LaserColor in project Charset by CharsetMC.

the class TileReflector method updateColor.

private void updateColor(int ri) {
    LaserColor oldColor = colors[ri];
    colors[ri] = passedColors[ri].union(bouncedColors[ri]);
    if (colors[ri] != oldColor) {
        CharsetLaser.laserStorage.markLaserForUpdate(TileReflector.this, EnumFacing.getFront(ri));
    }
}
Also used : LaserColor(pl.asie.charset.api.laser.LaserColor)

Aggregations

LaserColor (pl.asie.charset.api.laser.LaserColor)6 EnumFacing (net.minecraft.util.EnumFacing)4 IBlockState (net.minecraft.block.state.IBlockState)3 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)2 Orientation (pl.asie.charset.lib.utils.Orientation)2 BlockStainedGlass (net.minecraft.block.BlockStainedGlass)1 BufferBuilder (net.minecraft.client.renderer.BufferBuilder)1 Tessellator (net.minecraft.client.renderer.Tessellator)1 BakedQuad (net.minecraft.client.renderer.block.model.BakedQuad)1 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 Frustum (net.minecraft.client.renderer.culling.Frustum)1 ICamera (net.minecraft.client.renderer.culling.ICamera)1 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)1 DefaultVertexFormats (net.minecraft.client.renderer.vertex.DefaultVertexFormats)1 VertexFormat (net.minecraft.client.renderer.vertex.VertexFormat)1 Entity (net.minecraft.entity.Entity)1 EnumDyeColor (net.minecraft.item.EnumDyeColor)1 ItemStack (net.minecraft.item.ItemStack)1 TileEntity (net.minecraft.tileentity.TileEntity)1