Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wool under rails shuts minecarts no working #4791

Open
Insane96 opened this issue May 11, 2024 · 1 comment
Open

Wool under rails shuts minecarts no working #4791

Insane96 opened this issue May 11, 2024 · 1 comment

Comments

@Insane96
Copy link
Contributor

Zeta 1.0-16
Quark 4.0-441
Forge 47.2.30
Many other mods

I've placed wool under minecarts but the minecart doesn't shut up
The mixin seems to be correctly applied as seen from .mixin.out

   public void m_7788_() {
      if (this.f_119693_.m_213877_()) {
         this.m_119609_();
      } else {
         this.f_119575_ = (double)((float)this.f_119693_.m_20185_());
         this.f_119576_ = (double)((float)this.f_119693_.m_20186_());
         this.f_119577_ = (double)((float)this.f_119693_.m_20189_());
         AbstractMinecart injectorAllocatedLocal2 = this.f_119693_;
         float $$0 = (float)this.wrapOperation$fcg000$pretendThereIsNoMovementIfMuted(injectorAllocatedLocal2, (var0) -> {
            WrapOperationRuntime.checkArgumentCount(var0, 1, "[net.minecraft.world.entity.vehicle.AbstractMinecart]");
            return ((AbstractMinecart)var0[0]).m_20184_();
         }).m_165924_();
         if ($$0 >= 0.01F) {
            this.f_119694_ = Mth.m_14036_(this.f_119694_ + 0.0025F, 0.0F, 1.0F);
            this.f_119573_ = Mth.m_14179_(Mth.m_14036_($$0, 0.0F, 0.5F), 0.0F, 0.7F);
         } else {
            this.f_119694_ = 0.0F;
            this.f_119573_ = 0.0F;
         }

      }
   }

   @MixinMerged(
      mixin = "org.violetmoon.quark.mixin.mixins.client.MinecartSoundInstanceMixin",
      priority = 1000,
      sessionId = "baad290a-622c-43bd-8561-76e6ae700e14"
   )
   public Vec3 wrapOperation$fcg000$pretendThereIsNoMovementIfMuted(AbstractMinecart minecart, Operation original) {
      return !WoolShutsUpMinecartsModule.canPlay(minecart) ? Vec3.f_82478_ : (Vec3)original.call(new Object[]{minecart});
   }
@CraftyZombie
Copy link

I somewhat suspect this issue might be behavior related. When in the minecart, I can still hear it, but it's silent for occupants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants