Bugfix attempt: Try-catch in itemutils
This commit is contained in:
parent
e711ba6a2e
commit
87ed217b97
3 changed files with 10 additions and 4 deletions
|
@ -5,5 +5,5 @@ org.gradle.daemon=false
|
||||||
|
|
||||||
mc_version=1.18.2
|
mc_version=1.18.2
|
||||||
forge_version=40.2.1
|
forge_version=40.2.1
|
||||||
myversion=1.0.4.11
|
myversion=1.0.4.12
|
||||||
parchment_version=2022.11.06
|
parchment_version=2022.11.06
|
|
@ -36,8 +36,14 @@ public class ItemUtils {
|
||||||
{
|
{
|
||||||
Integer ret = 0;
|
Integer ret = 0;
|
||||||
|
|
||||||
Map<Enchantment, Integer> enchants = getEnchantments(stack);
|
try{
|
||||||
ret=enchants.get(ench);
|
|
||||||
|
Map<Enchantment, Integer> enchants = getEnchantments(stack);
|
||||||
|
ret=enchants.get(ench);
|
||||||
|
}catch(Exception e)
|
||||||
|
{
|
||||||
|
ret =0;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ modId="libzontreck" #mandatory
|
||||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||||
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
||||||
# see the associated build.gradle script for how to populate this completely automatically during a build
|
# see the associated build.gradle script for how to populate this completely automatically during a build
|
||||||
version="1.0.4.11" #mandatory
|
version="1.0.4.12" #mandatory
|
||||||
# A display name for the mod
|
# A display name for the mod
|
||||||
displayName="LibZontreck" #mandatory
|
displayName="LibZontreck" #mandatory
|
||||||
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||||
|
|
Reference in a new issue