Skip to content

Commit

Permalink
Merge pull request #60 from Kwantux/dev
Browse files Browse the repository at this point in the history
Patch 3.0.6
  • Loading branch information
Kwantux authored Nov 28, 2024
2 parents a185b08 + 1c34c75 commit e731430
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
runPaper.folia.registerTask()

group = "de.kwantux"
version = "3.0.5"
version = "3.0.6"
description = "A performance friendly way to sort your items"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ public boolean fillMissingData() {

@Override
public boolean accept(@Nonnull ItemStack stack) {
int matHash = stack.getItemMeta().hashCode();
int matId = stack.getType().ordinal();
int metaHash = stack.getItemMeta().hashCode();
for (int filter : filters) {
if (matHash == filter || metaHash == filter) return true;
if (matId == filter || metaHash == filter) return true;
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/kwantux/networks/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Config(Main main) throws SerializationException {
}
}

public static boolean blastProofComponents; // TODO: Blast proof components
public static boolean blastProofComponents;
/**
* Whether players that don't have a network should get a notification when opening a full chest
*/
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/kwantux/networks/config/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public ItemStack getNetworkWand(int mode) {
public ItemStack getRangeUpgrade(int tier) throws InvalidNodeException {
ItemStack upgrade = new ItemStack(rangeUpgradeMaterial);
ItemMeta meta = upgrade.getItemMeta();
meta.displayName(lang.getItemName("upgrade.range." + tier));
meta.displayName(lang.getItemName("upgrade.range." + (tier-1)));
meta.lore(lang.getItemLore("upgrade.range"));
PersistentDataContainer data = meta.getPersistentDataContainer();
data.set(new NamespacedKey(plugin, "upgrade.range"), PersistentDataType.INTEGER, tier+1);
data.set(new NamespacedKey(plugin, "upgrade.range"), PersistentDataType.INTEGER, tier);
upgrade.setItemMeta(meta);
return upgrade;
}
Expand Down Expand Up @@ -215,9 +215,9 @@ private void registerComponent(ComponentType type) {

private void registerRangeUpgrades() {
try {
for (int i = 0; i < config.get("upgrade.range").childrenList().size(); i++) {
for (int i = 1; i <= config.get("upgrade.range").childrenList().size(); i++) {

String path = "upgrade.range." + i;
String path = "upgrade.range." + (i-1);

NamespacedKey key = new NamespacedKey(plugin, path.replace(".", "_"));

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Networks v3.0.5
# Networks v3.0.6


## Report any bugs on Discord or Github
Expand Down

0 comments on commit e731430

Please sign in to comment.