Skip to content

Commit

Permalink
Add stattrackers to Eco item resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSzabo committed Dec 6, 2024
1 parent 37af963 commit 08e326b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public class EcoItemsResolver implements ItemResolver {
private final NamespacedKey reforgesKey = new NamespacedKey("reforges", "reforge_stone");
private final NamespacedKey ecoscrollsKey = new NamespacedKey("ecoscrolls", "scroll");
private final NamespacedKey ecocratesKey = new NamespacedKey("ecocrates", "key");
// TODO
//private final NamespacedKey stattrackersKey = new NamespacedKey("stattrackers", "tracker");
private final NamespacedKey stattrackersKey = new NamespacedKey("stattrackers", "stat_tracker");

@Override
public boolean matches(ItemStack item) {
Expand Down Expand Up @@ -55,7 +54,8 @@ private boolean isEcoItem(ItemStack item) {
pdc.has(ecoscrollsKey) ||
pdc.has(ecocratesKey) ||
pdc.has(ecoarmorShardKey) ||
pdc.has(ecoarmorUpgradeCrystalKey);
pdc.has(ecoarmorUpgradeCrystalKey) ||
pdc.has(stattrackersKey);
}

private TypeId resolveEcoItemId(ItemStack item) {
Expand Down Expand Up @@ -85,6 +85,8 @@ private TypeId resolveEcoItemId(ItemStack item) {
return new TypeId("eco", "ecoarmor:shard_" + pdc.get(ecoarmorShardKey, type));
} else if(pdc.has(ecoarmorUpgradeCrystalKey)) {
return new TypeId("eco", "ecoarmor:upgrade_crystal_" + pdc.get(ecoarmorUpgradeCrystalKey, type));
} else if(pdc.has(stattrackersKey)) {
return new TypeId("eco", "stattrackers:" + pdc.get(stattrackersKey, type));
}
return null;
}
Expand Down

0 comments on commit 08e326b

Please sign in to comment.