Skip to content

Fix EffFeed#8702

Open
hotpoc wants to merge 4 commits into
SkriptLang:dev/patchfrom
hotpoc:master
Open

Fix EffFeed#8702
hotpoc wants to merge 4 commits into
SkriptLang:dev/patchfrom
hotpoc:master

Conversation

@hotpoc

@hotpoc hotpoc commented Jun 12, 2026

Copy link
Copy Markdown

Problem

The person who updated the now current feed effect forgot to add a max level, so it stacks every time you do the normal feed player. I think it should instead only go above the max if specified with by %-number%, as it makes more sense logically (at least in my head).

Solution

It fixes it by just setting the food level to 20 if the beef amount isn't set.

Testing Completed

I did:
!feed player
!send food level of me

!feed player by 40
!send food level of me

And it seemed to work fine

Supporting Information

I guess it's a breaking change if players are using it specifically to stack feed themselves? I don't see why anyone would, though.


Completes: none
Related: none
AI assistance: none

@hotpoc hotpoc requested a review from a team as a code owner June 12, 2026 04:18
@hotpoc hotpoc requested review from Efnilite and Pesekjak and removed request for a team June 12, 2026 04:18
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Jun 12, 2026
@skriptlang-automation

This comment has been minimized.

@AnOwlBe

AnOwlBe commented Jun 12, 2026

Copy link
Copy Markdown

wonder if this would be better as an expr eg set saturation of player to 5 add 5 to saturation of player

edit: nvm ignore me that already exists

@skriptlang-automation skriptlang-automation Bot added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jun 12, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.16 Releases Jun 12, 2026
@TheMug06

Copy link
Copy Markdown
Contributor

Please target dev/patch or dev/feature

@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Jun 12, 2026

@TheMug06 TheMug06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm apart from requested change and base branch

return "feed " + players.toString(e, debug) + (beefs != null ? " by " + beefs.toString(e, debug) : "");
}
static {
Skript.registerEffect(EffFeed.class, "feed [the] %players% [by %-number% [beef[s]]]");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how [the] is needed in this pattern, seeing as the player is already valid. Which would make feed the the player and feed the {_list::*} possible.

@AnOwlBe

AnOwlBe commented Jun 12, 2026

Copy link
Copy Markdown
image am I missing something or did you remove the registry just to replace it with the older deprecated registry-

@TheMug06

Copy link
Copy Markdown
Contributor

Oop i forgot about the new registry
Yeah please stick to the new registry!!!

return "feed " + players.toString(e, debug) + (beefs != null ? " by " + beefs.toString(e, debug) : "");
}
static {
Skript.registerEffect(EffFeed.class, "feed [the] %players% [by %-number% [beef[s]]]");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the new registry system instead of reverting to the old one!

@hotpoc

hotpoc commented Jun 13, 2026

Copy link
Copy Markdown
Author

am I missing something or did you remove the registry just to replace it with the older deprecated registry-

i was gonna use the newer one but all the files i checked that used it all had their own module things to register them with. i didn't really know where to put it. where should it go?

@AnOwlBe

AnOwlBe commented Jun 13, 2026

Copy link
Copy Markdown

in playermodule as its relating to feeding a player

@hotpoc hotpoc changed the base branch from master to dev/patch June 13, 2026 00:56
@hotpoc hotpoc requested a review from TheMug06 June 13, 2026 01:18
Comment thread src/main/java/ch/njol/skript/effects/EffFeed.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants