Railcraft

Railcraft

34M Downloads

Jukebox Cart

MKVollmer25 opened this issue ยท 6 comments

commented

This is simply a minecart with a jukebox, great for listening to music on the go.

commented

Minecraft's sound system doesn't allow for this in a nice way. Sounds play at a set position and cannot move.

commented

It "might" be possible. But the only options are ugly hacks (playing single notes at a time) or rewriting the entity sound tracker to support multiple types of sound (track+music). Neither are very appealing to me.

commented

I think I can try this.

commented

I might be possible these days. MovingSound.java is far more robust than it used to be.

If you figure it out, apply it to whistles too.

I started an attempt with MinecartSound.java in client/utils/sound, but its incomplete.
https://github.com/Railcraft/Railcraft/blob/mc-1.10.2/src/main/java/mods/railcraft/client/util/sounds/MinecartSound.java

commented

Yes, I figured out we can play the sound when the cart is spawned (from events)

commented

Not really from events... The sounds are from packets instead.