File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
src/main/java/com/circulation/only_one_item/handler Expand file tree Collapse file tree 2 files changed +3
-15
lines changed 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.0
18+ mod_version = 1.2.1
1919root_package = com.circulation
2020mod_id = only_one_item
2121mod_name = OnlyOneItem
Original file line number Diff line number Diff line change @@ -48,22 +48,10 @@ public class MatchItemHandler {
4848 private static List <WeakReference <OOIItemStack >> list = new ObjectArrayList <>();
4949
5050 public static void preItemStackInit () {
51- odToTargetMap .keySet (). forEach (od -> {
51+ odToTargetMap .forEach (( od , i ) -> {
5252 var ods = OreDictionary .getOres (od );
53- var listC = new ObjectArrayList <>(ods );
5453 ods .clear ();
55- for (ItemStack stack : listC ) {
56- Item item = stack .getItem ();
57- ResourceLocation rl = item .getRegistryName ();
58- int meta = stack .getMetadata ();
59- if (rl == null ) continue ;
60- if ((finalItemBlackMap .containsKey (rl ) && finalItemBlackMap .get (rl ).contains (meta ))
61- || finalMODIDBlackSet .contains (rl .getNamespace ())
62- || allTarget .contains (SimpleItem .getInstance (stack ))) {
63- continue ;
64- }
65- ods .add (stack );
66- }
54+ ods .add (i .getItemStack ());
6755 });
6856
6957 if (list == null )
You can’t perform that action at this time.
0 commit comments