-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added support for infinite duration effects #6531
base: minor-next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is BC-breaking to any users of EffectInstance::getDuration()
.
I can understand the desire for this in the /effect
command, but I don't think we need alterations to the internals to achieve this. Providing Limits::INT32_MAX
is good for nearly 5 years.
I could get onboard with adding support for passing max
instead of a number for the effect duration, but the current change is too invasive for such little benefit IMO.
I can also see the need, but even if it means breaking the BC by changing the function's bound, wouldn't it be better to use null rather than -1? |
To make the duration of the effect infinite, the duration must be equal to -1 in the packet, hence my decision to do this. I'll rework my pull request so that it doesn't break the BC soon. But if you have any ideas on how to avoid breaking the BC, I'd love to hear them, but I don't think setting null instead of -1 will help. |
I don't think it's necessary to support infinite duration in I would prefer just accepting |
Too bad, I think it's not clean to use a large number when you want an effect to never stop. But have it your way. Minecraft Bedrock has added something that Java has had for years, and it's this kind of detail that makes the game experience cleaner, even if it's true that in the end it doesn't change anything in the player's gameplay. Isn't the point of software to have a server support with as many features as possible in common with the basic game? |
It's not worth breaking backwards compatibility over. |
Per suggestion from @SOF3 this could mostly avoid BC breaks by using It would still be a behavioural change, but the only code affected would likely have intended an infinite effect anyway. However, this would require conversion to the appropriate Bedrock values on the network layer and for NBT entity storage. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This PR has been marked as "Waiting on Author", but we haven't seen any activity in 7 days. If there is no further activity, it will be closed in 28 days. Note for maintainers: Adding an assignee to the PR will prevent it from being marked as stale. |
Infinite effects