Skip to content

Commit

Permalink
- Fixes inscription sorting.
Browse files Browse the repository at this point in the history
- Mitigates the vault doll issue with missing nbt data.
  • Loading branch information
BONNe committed Dec 8, 2023
1 parent 3854d6b commit 7d55a45
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 25 deletions.
21 changes: 9 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
}
}
dependencies {
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.7.+'
}
}

Expand Down Expand Up @@ -80,11 +80,13 @@ minecraft {
}

client {
workingDirectory = project.file('run/client')
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', mod_id
}

server {
workingDirectory = project.file('run/server')
property 'forge.enabledGameTestNamespaces', mod_id
args '--nogui'
}
Expand Down Expand Up @@ -126,17 +128,6 @@ repositories {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
maven { url "https://nexus.vankka.dev/repository/maven-public/" }
maven { url "https://repository.dev.gotan.io/repository/gotan.os/" }
maven { url "https://repo.opencollab.dev/maven-snapshots" }
maven { url "https://repo.opencollab.dev/maven-releases" }
maven {
name = 'sonatype-oss'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
flatDir {
dirs 'libs'
}
maven { url "https://cursemaven.com" }
}

Expand Down Expand Up @@ -166,6 +157,12 @@ dependencies {
// implementation fg.deobf("curse.maven:curios-309927:4418032")
// implementation fg.deobf("curse.maven:autoreglib-250363:3642382")
// implementation fg.deobf("curse.maven:sophisticated-backpacks-vault-hunters-edition-696425:4287544")
// implementation fg.deobf("curse.maven:configured-457570:4462832")
// implementation fg.deobf("curse.maven:sophisticated-storage-619320:4736649")
// implementation fg.deobf("curse.maven:cyclops-core-232758:4162660")
// implementation fg.deobf("curse.maven:colossal-chests-237875:3768512")
// implementation fg.deobf("curse.maven:geckolib-388172:4181370")
// implementation fg.deobf("curse.maven:vault-integrations-867003:4641741")
}

// This block of code expands all declared replace properties in the specified resource targets.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ sophisticated_backpacks_version=4637292
# The version of Sophisticated Backpacks Mod
storage_network_version=3868680
# The mod version. See https://semver.org/
mod_version=2.4.0
mod_version=2.4.1
# The change Log
changelog=Initial Release
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ private static int compareModel(VaultGearData leftData, VaultGearData rightData)
private static int compareInstability(CompoundTag leftData, CompoundTag rightData)
{
return leftData.contains("instability") && rightData.contains("instability") ?
Integer.compare(leftData.getInt("instability"), rightData.getInt("instability")) :
Float.compare(leftData.getFloat("instability"), rightData.getFloat("instability")) :
0;
}

Expand Down Expand Up @@ -998,7 +998,7 @@ private static int getUsedVaults(CompoundTag tag)
*/
private static String getDollName(CompoundTag tag)
{
return tag.contains("playerProfile") && tag.getCompound("playerProfile").contains("Name") ?
return tag != null && tag.contains("playerProfile") && tag.getCompound("playerProfile").contains("Name") ?
tag.getCompound("playerProfile").getString("Name") : "";
}

Expand All @@ -1010,7 +1010,7 @@ private static String getDollName(CompoundTag tag)
*/
private static float getDollXP(CompoundTag tag)
{
return tag.contains("xpPercent") ? tag.getFloat("xpPercent") : 0f;
return tag != null && tag.contains("xpPercent") ? tag.getFloat("xpPercent") : 0f;
}


Expand All @@ -1021,7 +1021,7 @@ private static float getDollXP(CompoundTag tag)
*/
private static float getDollLoot(CompoundTag tag)
{
return tag.contains("lootPercent") ? tag.getFloat("lootPercent") : 0f;
return tag != null && tag.contains("lootPercent") ? tag.getFloat("lootPercent") : 0f;
}


Expand All @@ -1032,7 +1032,7 @@ private static float getDollLoot(CompoundTag tag)
*/
private static boolean getDollCompletion(CompoundTag tag)
{
return tag.contains("vaultUUID");
return tag != null && tag.contains("vaultUUID");
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.ae2.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.ae2.AE2IntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.qio.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.qio.QIOIntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.quark.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.quark.QuarkIntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.refinedstorage.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.refinedstorage.RefinedStorageIntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.sophisticatedcore.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.sophisticatedcore.SophisticatedCoreIntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.storagenetwork.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.storagenetwork.StorageNetworkIntegrationModConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": "lv.id.bonne.vaulthunters.jewelsorting.vaulthunters.mixin",
"refmap": "mixins.vaulthunters_jewel_sorting.refmap.json",
"refmap": "mixins.vault_hunters_jewel_sorting.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"plugin": "lv.id.bonne.vaulthunters.jewelsorting.vaulthunters.VaultHuntersIntegrationModConfiguration",
Expand Down

0 comments on commit 7d55a45

Please sign in to comment.