File tree Expand file tree Collapse file tree
src/main/java/com/circulation/only_one_item/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ show_testing_output = false
1515
1616# Mod Information
1717# HIGHLY RECOMMEND complying with SemVer for mod_version: https://semver.org/
18- mod_version = 1.2.5
18+ mod_version = 1.2.6
1919root_package = com.circulation
2020mod_id = only_one_item
2121mod_name = OnlyOneItem
Original file line number Diff line number Diff line change 11package com .circulation .only_one_item .util ;
22
3+ import com .circulation .only_one_item .OnlyOneItem ;
34import it .unimi .dsi .fastutil .ints .Int2ObjectOpenHashMap ;
45import lombok .Getter ;
56import lombok .ToString ;
@@ -55,6 +56,7 @@ public static SimpleItem getInstance(final ItemStack stack) {
5556
5657 public static SimpleItem getNoNBTInstance (final ItemStack stack ) {
5758 if (stack .isEmpty ()) return empty ;
59+ if (stack .getItem ().getRegistryName () == null ) OnlyOneItem .LOGGER .error ("{} RegistryName does not exist" ,stack .getItem ().getClass ().getName ());
5860 return getInstance (stack .getItem ().getRegistryName (), stack .getItemDamage ());
5961 }
6062
You can’t perform that action at this time.
0 commit comments