use of org.spongepowered.api.advancement.TreeLayout in project SpongeCommon by SpongePowered.
the class MixinAdvancementTreeNode method onLayout.
@Inject(method = "layout", at = @At("RETURN"))
private static void onLayout(Advancement root, CallbackInfo ci) {
final AdvancementTree advancementTree = ((org.spongepowered.api.advancement.Advancement) root).getTree().get();
final TreeLayout layout = new SpongeTreeLayout((SpongeAdvancementTree) advancementTree);
SpongeImpl.postEvent(SpongeEventFactory.createAdvancementTreeEventGenerateLayout(Sponge.getCauseStackManager().getCurrentCause(), layout, advancementTree));
}
Aggregations