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

Make MusicPlayer weapons need to be rewind. #408

Open
LunyaticCat opened this issue Dec 26, 2022 · 1 comment
Open

Make MusicPlayer weapons need to be rewind. #408

LunyaticCat opened this issue Dec 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@LunyaticCat
Copy link
Contributor

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.

@kirderf1
Copy link
Member

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.

@kirderf1 kirderf1 added the enhancement New feature or request label Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants