-
-
Notifications
You must be signed in to change notification settings - Fork 412
Add paper's EntityFertilizeEgg event #8231
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
base: dev/feature
Are you sure you want to change the base?
Conversation
Also change for: - block fertilize event bone[ ]meal alias - ExprBreedingFamily tweaks so that it also accepts the FertilizeEgg event
oh and on the error message screenshot, changed the first error message line to |
"\tif event-entity is a frog:", | ||
"\t\tsend \"A frog just became pregnant!\"" | ||
) | ||
.since("2.14"); |
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.
.since("2.14"); | |
.since("INSERT VERSION"); |
.since("2.14"); | ||
|
||
EventValues.registerEventValue(EntityFertilizeEggEvent.class, Entity.class, event -> { | ||
assert false; |
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 will error on all servers with the ea
flag, so probably best to remove it
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; | ||
} |
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.
EventRestrictedSyntax
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.
where's the java code for summoning the frogs?
public class EvtFertilizeEgg extends SkriptEvent { | ||
static { |
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.
public class EvtFertilizeEgg extends SkriptEvent { | |
static { | |
public class EvtFertilizeEgg extends SkriptEvent { | |
static { |
.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!\"" | ||
) |
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.
.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); |
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.
return "on fertilizing egg" + (entitiesLiteral == null ? "" : " of " + entitiesLiteral); | |
return "on fertilizing egg" + (entitiesLiteral == null ? "" : " of " + entitiesLiteral.toString(event, debug)); |
Problem
#7819
Solution
[block] fertilize
->"[block] (fertilize|bone[ ]meal)"
)child
from 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