Search in sources :

Example 1 with TreeLayout

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));
}
Also used : SpongeTreeLayout(org.spongepowered.common.advancement.SpongeTreeLayout) SpongeAdvancementTree(org.spongepowered.common.advancement.SpongeAdvancementTree) AdvancementTree(org.spongepowered.api.advancement.AdvancementTree) SpongeTreeLayout(org.spongepowered.common.advancement.SpongeTreeLayout) TreeLayout(org.spongepowered.api.advancement.TreeLayout) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

AdvancementTree (org.spongepowered.api.advancement.AdvancementTree)1 TreeLayout (org.spongepowered.api.advancement.TreeLayout)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1 SpongeAdvancementTree (org.spongepowered.common.advancement.SpongeAdvancementTree)1 SpongeTreeLayout (org.spongepowered.common.advancement.SpongeTreeLayout)1