Skip to content

Commit e64af46

Browse files
committed
修复bug
1 parent 51db94d commit e64af46

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
1919
root_package = com.circulation
2020
mod_id = only_one_item
2121
mod_name = OnlyOneItem

src/main/java/com/circulation/only_one_item/handler/MatchItemHandler.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)