Add paper's EntityFertilizeEgg event#8231
Open
CJH3139 wants to merge 15 commits intoSkriptLang:dev/featurefrom
Open
Add paper's EntityFertilizeEgg event#8231CJH3139 wants to merge 15 commits intoSkriptLang:dev/featurefrom
CJH3139 wants to merge 15 commits intoSkriptLang:dev/featurefrom
Conversation
Also change for: - block fertilize event bone[ ]meal alias - ExprBreedingFamily tweaks so that it also accepts the FertilizeEgg event
Contributor
Author
|
oh and on the error message screenshot, changed the first error message line to |
Efnilite
requested changes
Oct 9, 2025
| "\tif event-entity is a frog:", | ||
| "\t\tsend \"A frog just became pregnant!\"" | ||
| ) | ||
| .since("2.14"); |
Member
There was a problem hiding this comment.
Suggested change
| .since("2.14"); | |
| .since("INSERT VERSION"); |
| .since("2.14"); | ||
|
|
||
| EventValues.registerEventValue(EntityFertilizeEggEvent.class, Entity.class, event -> { | ||
| assert false; |
Member
There was a problem hiding this comment.
this will error on all servers with the ea flag, so probably best to remove it
Comment on lines
+42
to
+45
| if (!getParser().isCurrentEvent(EntityBreedEvent.class) && !getParser().isCurrentEvent(EntityFertilizeEggEvent.class)) { | ||
| Skript.error("The 'breeding family' expression can only be used in an breed or fertilize egg event."); | ||
| return false; | ||
| } |
Absolutionism
requested changes
Oct 10, 2025
Comment on lines
+14
to
+15
| public class EvtFertilizeEgg extends SkriptEvent { | ||
| static { |
Contributor
There was a problem hiding this comment.
Suggested change
| public class EvtFertilizeEgg extends SkriptEvent { | |
| static { | |
| public class EvtFertilizeEgg extends SkriptEvent { | |
| static { |
Comment on lines
+21
to
+27
| .examples( | ||
| "on fertilizing egg of turtles:", | ||
| "\tsend \"A turtle just fertilized an egg!\"", | ||
| "on fertilizing egg:", | ||
| "\tif event-entity is a frog:", | ||
| "\t\tsend \"A frog just became pregnant!\"" | ||
| ) |
Contributor
There was a problem hiding this comment.
Suggested change
| .examples( | |
| "on fertilizing egg of turtles:", | |
| "\tsend \"A turtle just fertilized an egg!\"", | |
| "on fertilizing egg:", | |
| "\tif event-entity is a frog:", | |
| "\t\tsend \"A frog just became pregnant!\"" | |
| ) | |
| .examples(""" | |
| on fertilizing egg of turtles: | |
| send "A turtle just fertilized an egg!" | |
| on fertilizing egg: | |
| if event-entity is a frog: | |
| send "A frog just became pregnant!" | |
| """) |
Also, use broadcast instead of send since that's invalid as there's no default player to send a message to.
|
|
||
| @Override | ||
| public String toString(@Nullable Event event, boolean debug) { | ||
| return "on fertilizing egg" + (entitiesLiteral == null ? "" : " of " + entitiesLiteral); |
Contributor
There was a problem hiding this comment.
Suggested change
| return "on fertilizing egg" + (entitiesLiteral == null ? "" : " of " + entitiesLiteral); | |
| return "on fertilizing egg" + (entitiesLiteral == null ? "" : " of " + entitiesLiteral.toString(event, debug)); |
Member
|
Do you intend to continue working on this? |
Removed all the deprecated things (EventValue & registerEvent) and now uses EventValueRegistry & SyntaxRegistry
Absolutionism
requested changes
Apr 17, 2026
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Absolutionism
requested changes
Apr 17, 2026
| @Test | ||
| public void test() { | ||
| Bukkit.getPluginManager().callEvent( | ||
| new EntityFertilizeEggEvent(mother, father, null, null, 0)); |
Contributor
There was a problem hiding this comment.
Should add in a player, itemstack, and arbitrary number for experience to make sure the event values work in the sk file
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…/EvtFertilizeEggTest.java Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…in the skript file
Efnilite
reviewed
Apr 19, 2026
Efnilite
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#7819
Solution
[block] fertilize->"[block] (fertilize|bone[ ]meal)")childfrom ExprBreedingFamily (Still in blockstate or not an entity at all in some case)Testing Completed
Tested both with a script and manually

Supporting Information
Completes: #7819
Related: none