Skip to content
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

Add support for ResourceKey in advancement background #2309

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.datapack.DataPackSerializable;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.advancement.criteria.AdvancementCriterion;
Expand Down Expand Up @@ -133,8 +134,7 @@ interface RootStep extends Builder {
*
* @return This builder, for chaining
*/
// TODO: Deprecate when ResourcePath is available
Builder background(String backgroundPath);
Builder background(ResourceKey backgroundPath);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
*/
package org.spongepowered.api.advancement;

import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.entity.living.player.Player;

import java.util.Optional;

/**
* Represents a {@link Advancement} tree or tab menu. The tree will become
* visible to a {@link Player} once the root {@link Advancement} gets achieved.
Expand All @@ -44,9 +47,6 @@ public interface AdvancementTree {
*
* @return The background texture
*/
// TODO: Deprecate when ResourcePath is available
String getBackgroundPath();

// ResourcePath getBackground();
Optional<ResourceKey> getBackgroundPath();

}