Skip to content

Commit

Permalink
impl for new core commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 12, 2020
1 parent 2d19861 commit 41bd425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -62,7 +62,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) {
ItemTag item = new ItemTag(this.item.getItemStack().clone());
FlagCommand.FlagActionProvider provider = new FlagCommand.FlagActionProvider();
provider.tracker = item.getFlagTracker();
DataAction action = DataActionHelper.parse(provider, attribute.getContext(1));
DataAction action = DataActionHelper.parse(provider, attribute.getContext(1), attribute.context);

// <--[tag]
// @attribute <ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]>
Expand Down Expand Up @@ -130,7 +130,7 @@ public void adjust(Mechanism mechanism) {
if (mechanism.matches("flag")) {
FlagCommand.FlagActionProvider provider = new FlagCommand.FlagActionProvider();
provider.tracker = item.getFlagTracker();
DataAction action = DataActionHelper.parse(provider, mechanism.getValue().asString());
DataAction action = DataActionHelper.parse(provider, mechanism.getValue().asString(), mechanism.context);
action.execute(mechanism.context);
item.reapplyTracker(provider.tracker);
}
Expand Down
Expand Up @@ -182,7 +182,7 @@ else if (!scriptEntry.hasObject("duration")
}
else if (!scriptEntry.hasObject("flag_action")
&& isFlag) {
scriptEntry.addObject("flag_action", DataActionHelper.parse(new FlagCommand.FlagActionProvider(), arg.getRawValue()));
scriptEntry.addObject("flag_action", DataActionHelper.parse(new FlagCommand.FlagActionProvider(), arg, scriptEntry.context));
}
else {
arg.reportUnhandled();
Expand Down

0 comments on commit 41bd425

Please sign in to comment.