public int updatePower(World worldIn, BlockPos pos) {
if (worldIn.provider.hasSkyLight()) {
int i = worldIn.getLightFor(EnumSkyBlock.SKY, pos) - worldIn.getSkylightSubtracted();
float f = worldIn.getCelestialAngleRadians(1.0F);
float f1 = f < (float) Math.PI ? 0.0F : (float) Math.PI * 2F;
f = f + (f1 - f) * 0.2F;
i = Math.round(i * MathHelper.cos(f));
i = MathHelper.clamp(i, 0, 15);
return i;
}
return 0;
}
WorldDayLightSensor.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录