@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); TileAltar tile = (TileAltar) world.getTileEntity(pos); return tile != null && tile.hasLava ? 15 : 0; }
@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); return state.getValue(BotaniaStateProps.LIVINGWOOD_VARIANT) == LivingWoodVariant.GLIMMERING ? 12 : 0; }
@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); return state.getValue(BotaniaStateProps.ALFPORTAL_STATE) != AlfPortalState.OFF ? 15 : 0; }
@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); TileEntity tile = world.getTileEntity(pos); return tile instanceof TileSpecialFlower ? ((TileSpecialFlower) tile).getLightValue() : lightValue; }
@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); return world.getTileEntity(pos) == null ? 0 : ((TileSpecialFlower) world.getTileEntity(pos)).getLightValue(); }
@Override @Optional.Method(modid = "easycoloredlights") public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { if(world.getBlockState(pos).getBlock() != this) return world.getBlockState(pos).getLightValue(world, pos); return ((TileManaFlame) world.getTileEntity(pos)).getLightColor(); }
@SuppressWarnings("deprecation") @Override public int getLightValue() { return state.getLightValue(); }
@Override public int getLightValue() { return state.getLightValue(); }
public default int getLightValue(IBlockState state) { return state.getLightValue(); }
@Override public int getLightValue(@Nonnull IBlockAccess world1, @Nonnull BlockPos pos1) { return state.getLightValue(world1, pos1); }
@Override public int getCombinedLight(@Nonnull BlockPos pos, int lightValue) { return SKY_LIGHT | (POS.equals(pos) ? state.getLightValue(this, POS) : 0) << 4; }
public default int getLightValue(IBlockAccess world, BlockPos pos, IPartInfo part) { return part.getState().getLightValue(world, pos); }
@Override public int getLightValue(@Nonnull IBlockState state, IBlockAccess world, @Nonnull BlockPos pos) { IBlockState other = world.getBlockState(pos); if (other.getBlock() != this) { return other.getLightValue(world, pos); } return getEnumFromState(getActualState(state, world, pos)).isMine() ? 15: 0; }
private static VertexLighterFlat setupLighter(CCRenderState ccrs, IBlockState state, IBlockAccess access, BlockPos pos, IBakedModel model) { boolean renderAO = Minecraft.isAmbientOcclusionEnabled() && state.getLightValue(access, pos) == 0 && model.isAmbientOcclusion(); VertexLighterFlat lighter = renderAO ? lighterSmooth.get() : lighterFlat.get(); CCRSConsumer consumer = new CCRSConsumer(ccrs); lighter.setParent(consumer); consumer.setOffset(pos); return lighter; }
@Override public int getLightValue(@Nonnull IBlockState bs, @Nonnull IBlockAccess world, @Nonnull BlockPos pos) { TileConduitBundle te = getTileEntitySafe(world, pos); if (te == null) { return super.getLightValue(bs, world, pos); } int result = 0; if (te.hasFacade()) { IBlockState paintSource = te.getPaintSourceNN(); result = paintSource.getLightValue(); if (paintSource.isOpaqueCube()) { return result; } } if (ConduitConfig.dynamicLighting.get()) { Collection<? extends IConduit> conduits = te.getConduits(); for (IConduit conduit : conduits) { result += conduit.getLightValue(); } } return result > 15 ? 15 : result; }
private void spawnEntities() { if (lightSensitive) { int light = world.getBlockState(pos).getLightValue(world, pos);
continue; int srcLight = srcState.getLightValue(world, srcPos); float brightness = (float) srcLight / 15F;
public static Block createFluidBlock() { fluid.setLuminosity(Blocks.GLOWSTONE.getDefaultState().getLightValue()); // sic! Create the block for our fluid but then set the current fluid @SuppressWarnings("null") MoltenGlowstone block = new MoltenGlowstone(fluid, Material.WATER, 0xffbc5e); block.setFluidStack(new FluidStack(FluidRegistry.getFluid(fluid.getName()), Fluid.BUCKET_VOLUME)); NBTTagCompound tag = new NBTTagCompound(); tag.setString("fluid", fluid.getName()); tag.setString("ore", "Glowstone"); tag.setBoolean("toolforge", true); FMLInterModComms.sendMessage("tconstruct", "integrateSmeltery", tag); return block; }
public static Block createFluidBlock() { fluid.setLuminosity(Blocks.LIT_REDSTONE_ORE.getDefaultState().getLightValue() * 7 / 10); @SuppressWarnings("null") MoltenRedstone block = new MoltenRedstone(fluid, Material.WATER, 0xff0000); block.setFluidStack(new FluidStack(FluidRegistry.getFluid(fluid.getName()), Fluid.BUCKET_VOLUME)); NBTTagCompound tag = new NBTTagCompound(); tag.setString("fluid", fluid.getName()); tag.setString("ore", "Redstone"); tag.setBoolean("toolforge", true); FMLInterModComms.sendMessage("tconstruct", "integrateSmeltery", tag); return block; }