Skip to content

Commit

Permalink
structure grows event: generic matchable support
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 15, 2022
1 parent 32dcc80 commit 45616a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -66,8 +66,7 @@ public boolean couldMatch(ScriptPath path) {
@Override
public boolean matches(ScriptPath path) {
String struct = path.eventArgLowerAt(0);
if (!struct.equals("structure") && !struct.equals("plant") &&
!struct.equals(CoreUtilities.toLowerCase(event.getSpecies().name()))) {
if (!struct.equals("structure") && !struct.equals("plant") && !runGenericCheck(struct, event.getSpecies().name())) {
return false;
}
if (path.eventArgLowerAt(2).equals("from") && !event.isFromBonemeal()) {
Expand Down
Expand Up @@ -2154,7 +2154,7 @@ else if (foodLevel / maxHunger < 1) {
// @description
// Returns the total amount of experience points the player has.
// This is how much XP the player has ever received, not a current value.
// To get the current total, use @<link tag PlayerTag.calculate_xp>.
// To get the current total, use <@link tag PlayerTag.calculate_xp>.
// -->
registerOnlineOnlyTag(ElementTag.class, "xp_total", (attribute, object) -> {
return new ElementTag(object.getPlayerEntity().getTotalExperience());
Expand Down

0 comments on commit 45616a4

Please sign in to comment.