MinecraftForge / ForgeFlower

Forge's modifications to FernFlower. Fixing various bugs/inconsistencies. Main Repo: https://github.com/MinecraftForge/FernFlower
Apache License 2.0
80 stars 44 forks source link

AbstractOption : autounboxing is being used in decompile, creating compilation errors #69

Closed cpw closed 4 years ago

cpw commented 4 years ago
   public static final SliderPercentageOption field_216704_k = new SliderPercentageOption("options.mipmapLevels", 0.0D, 4.0D, 1.0F, (p_216667_0_) -> {
      return (double)p_216667_0_.field_151442_I;
   }, (p_216585_0_, p_216585_1_) -> {
      p_216585_0_.field_151442_I = (int)p_216585_1_;
   }, (p_216629_0_, p_216629_1_) -> {
      double d0 = p_216629_1_.func_216729_a(p_216629_0_);
      IFormattableTextComponent iformattabletextcomponent = p_216629_1_.func_238238_a_();
      return d0 == 0.0D ? iformattabletextcomponent.func_230529_a_(DialogTexts.field_240631_b_) : iformattabletextcomponent.func_240702_b_(Integer.toString((int)d0));
   });

The int cast is decompiled incorrectly - it should be intValue() on the parameter, or doubleValue even. This works in 1.15.2.