高性能和高兼容性的1.12.2/1.16.5/1.18.2版本Forge+Bukkit+Spigot服务端 (A high performance and high compatibility 1.12.2/1.16.5/1.18.2 version Forge+Bukkit+Spigot server)
Using Bukkit's recipe iterator, it throws the following error when simply looping over the iterator:
[20:23:09] [Server thread/ERROR]: Error occurred while enabling AngelChest v9.4.0 (Is it up to date?)
java.util.NoSuchElementException: null
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1471) ~[?:1.8.0_333]
at java.util.HashMap$ValueIterator.next(HashMap.java:1498) ~[?:1.8.0_333]
at org.bukkit.craftbukkit.v1_16_R3.inventory.RecipeIterator.next(RecipeIterator.java:31) ~[forge:?]
at org.bukkit.craftbukkit.v1_16_R3.inventory.RecipeIterator.next(RecipeIterator.java:12) ~[forge:?]
at de.jeff_media.angelchest.jC.<init>(lt:360) ~[?:?] <-- See below java code
...
To reproduce (the marked line is the line that throws the above error):
Iterator<Recipe> iterator = Bukkit.recipeIterator();
while(iterator.hasNext()) { // <-- This is the marked line from the above stacktrace
// Do something...
This probably only happens when using blocks / items added by forge mods.
Suggested fix: Make the RecipeIterator only return recipes that contain blocks / items recognizable by Bukkit's Material class.
Using Bukkit's recipe iterator, it throws the following error when simply looping over the iterator:
To reproduce (the marked line is the line that throws the above error):
This probably only happens when using blocks / items added by forge mods.
Suggested fix: Make the RecipeIterator only return recipes that contain blocks / items recognizable by Bukkit's Material class.