File tree Expand file tree Collapse file tree
src/main/java/com/circulation/only_one_item/handler 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.1
18+ mod_version = 1.2.2
1919root_package = com.circulation
2020mod_id = only_one_item
2121mod_name = OnlyOneItem
Original file line number Diff line number Diff line change @@ -50,7 +50,19 @@ public class MatchItemHandler {
5050 public static void preItemStackInit () {
5151 odToTargetMap .forEach ((od ,i ) -> {
5252 var ods = OreDictionary .getOres (od );
53+ var listC = new ObjectArrayList <>(ods );
5354 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+ ods .add (stack );
64+ }
65+ }
5466 ods .add (i .getItemStack ());
5567 });
5668
You can’t perform that action at this time.
0 commit comments