net.minecraft.world.World.getCelestialAngle()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中net.minecraft.world.World.getCelestialAngle()方法的一些代码示例,展示了World.getCelestialAngle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.getCelestialAngle()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:getCelestialAngle

World.getCelestialAngle介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public float getCelestialAngle(float partialTicks) {
 return wrapped.getCelestialAngle(partialTicks);
}

代码示例来源:origin: amadornes/MCMultiPart

@Override
public float getCelestialAngle(float partialTicks) {
  return getActualWorld().getCelestialAngle(partialTicks);
}

代码示例来源:origin: SquidDev-CC/plethora

@SubtargetedModuleObjectMethod.Inject(
  module = IntegrationVanilla.clock, target = IWorldLocation.class, worldThread = false,
  doc = "function():number -- The angle the sun or moon lies at in degrees. 0 is directly overhead."
)
public static Object[] getCelestialAngle(IWorldLocation location, IContext<IModuleContainer> context, Object[] args) {
  World world = location.getWorld();
  return new Object[]{world.getCelestialAngle(1) * 360};
}

代码示例来源:origin: Vazkii/Quark

@Override
@SideOnly(Side.CLIENT)
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
  if(!isCalculated(stack))
    return 0F;
  
  boolean carried = entityIn != null;
  Entity entity = carried ? entityIn : stack.getItemFrame();
  if(worldIn == null && entity != null)
    worldIn = entity.world;
  if(worldIn == null)
    return 0F;
  else {
    double angle;
    if (worldIn.provider.isSurfaceWorld())
      angle = (double)worldIn.getCelestialAngle(1.0F);
    else
      angle = Math.random();
    angle = wobble(worldIn, angle);
    return (float) angle;
  }
}
@SideOnly(Side.CLIENT)

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Nonnull
public Vec3d getSkyColor(@Nonnull Entity cameraEntity, float partialTicks) {
  float f1 = world.getCelestialAngle(partialTicks);
  float f2 = MathHelper.cos(f1 * (float) Math.PI * 2.0F) * 2.0F + 0.5F;

代码示例来源:origin: TeamLapen/Vampirism

if (VampirismAPI.sundamageRegistry().getSundamageInDim(entity.getEntityWorld().provider.getDimension())) {
  if (!entity.getEntityWorld().isRaining()) {
    float angle = entity.getEntityWorld().getCelestialAngle(1.0F);

相关文章

微信公众号

最新文章

更多

World类方法