VMH - Variable Mob Height

VMH - Variable Mob Height

2M Downloads

[Bug Major] Crash with Chicken

Viola-Siemens opened this issue ยท 0 comments

commented

Chicken.class after injection:

   //...
   public void m_8107_() {
      super.m_8107_();
      this.f_28229_ = this.f_28226_;
      this.f_28228_ = this.f_28227_;
      this.f_28227_ += (this.f_19861_ ? -1.0F : 4.0F) * 0.3F;
      this.f_28227_ = Mth.m_14036_(this.f_28227_, 0.0F, 1.0F);
      if (!this.f_19861_ && this.f_28230_ < 1.0F) {
         this.f_28230_ = 1.0F;
      }

      this.f_28230_ *= 0.9F;
      Vec3 $$0 = this.m_20184_();
      if (!this.f_19861_ && $$0.f_82480_ < 0.0D) {
         this.m_20256_($$0.m_82542_(1.0D, 0.6D, 1.0D));
      }

      this.f_28226_ += this.f_28230_ * 2.0F;
      if (!this.f_19853_.f_46443_ && this.m_6084_() && !this.m_6162_() && !this.m_28264_() && --this.f_28231_ <= 0) {
         this.m_5496_(SoundEvents.f_11752_, 1.0F, (this.f_19796_.nextFloat() - this.f_19796_.nextFloat()) * 0.2F + 1.0F);
         this.m_19998_(Items.f_42521_);
         this.f_28231_ = this.f_19796_.nextInt(this.constant$bkc000$injectedEggTime(6000)) + 6000;
      }
   }
   
   //...
   
   @MixinMerged(
      mixin = "com.rikurob.vmh.mixin.ChickenMixin",
      priority = 1000,
      sessionId = "631c838c-ef61-4b94-8971-97b32134719c"
   )
   private int constant$bkc000$injectedEggTime(int value) {
      return Math.round((float)value * ScalingHandler.getScale(this));
   }

Method constant$bkc000$injectedEggTime might return 0, which causes the crash.

Full crash report:
crash-2024-07-02_18.15.08-server.txt

Full latest.log:
latest.log

This issue provides more supplementary information to #4 .