Minestuck

Minestuck

101k Downloads

Make MusicPlayer weapons need to be rewind.

LunyaticCat opened this issue ยท 1 comments

commented

Currently, after the music finish, the player still benefit from bonuses from the cassette played, despite no music being played.
After the music finish, the weapon should stop giving effects to the player/enemy until the cassette has been rewinded.

commented

When implementing this, the feature could be broken down into three parts:

  • Representation in item stack: how far a cassette has been played should be stored and accessed from the item stack. It could be done directly in the item stack nbt, or with a capability, although the former should be more straightforward. It could make sense to store it as how many ticks that the song has been played, but it could also be stored as a fraction of how much of the song has been played.
  • Cassette playing: when playing a cassette, the item should wound forward with the music, and also start at the position set in the item. The hardest part would likely be to figure out how to play music a set time from its start.
  • Cassette rewinding: have a way of rewinding cassettes using the cassette player and/or music player weapon. For this, we need to come up with a design on how a player would trigger and stop rewinding.

This feature is better implemented in 1.19, where music lengths have already been attached to regular music disks.