WolfyScript / CustomCrafting-Wiki

Wiki and JavaDocs for CustomCrafting
https://www.spigotmc.org/resources/55883/
9 stars 3 forks source link

(Bug) Some recipes don't work, don't know why. #38

Closed Pixelcraftian closed 2 years ago

Pixelcraftian commented 3 years ago
[ERROR] .... [CustomCrafting] -------- WHAT HAPPENED? Please report! --------
[WARNING] .... java.lang.NullPointerException: Cannot invoke "net.minecraft.resources.MinecraftKey.getNamespace()" because "minecraft" is null
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.util.CraftNamespacedKey.fromMinecraft(CraftNamespacedKey.java:24)
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.block.CraftBlock.biomeBaseToBiome(CraftBlock.java:518)
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.CraftWorld.getBiome(CraftWorld.java:1118)
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.block.CraftBlock.getBiome(CraftBlock.java:505)
[WARNING] .... at me.wolfyscript.customcrafting.recipes.conditions.WorldBiomeCondition.check(WorldBiomeCondition.java:31)
[WARNING] .... at me.wolfyscript.customcrafting.recipes.Conditions.checkConditions(Conditions.java:52)
[WARNING] .... at me.wolfyscript.customcrafting.recipes.types.ICustomRecipe.checkConditions(ICustomRecipe.java:90)
[WARNING] .... at me.wolfyscript.customcrafting.utils.CraftManager.checkRecipe(CraftManager.java:74)
[WARNING] .... at me.wolfyscript.customcrafting.utils.CraftManager.lambda$preCheckRecipe$0(CraftManager.java:59)
[WARNING] .... at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
[WARNING] .... at java.base/java.util.stream.SortedOps$RefSortingSink.end(Unknown Source)
[WARNING] .... at java.base/java.util.stream.Sink$ChainedReference.end(Unknown Source)
[WARNING] .... at java.base/java.util.stream.Sink$ChainedReference.end(Unknown Source)
[WARNING] .... at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
[WARNING] .... at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
[WARNING] .... at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
[WARNING] .... at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
[WARNING] .... at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
[WARNING] .... at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
[WARNING] .... at me.wolfyscript.customcrafting.utils.CraftManager.preCheckRecipe(CraftManager.java:59)
[WARNING] .... at me.wolfyscript.customcrafting.listeners.CraftListener.onPreCraft(CraftListener.java:85)
[WARNING] .... at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor563.execute(Unknown Source)
[WARNING] .... at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[WARNING] .... at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[WARNING] .... at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[WARNING] .... at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPreCraftEvent(CraftEventFactory.java:1302)
[WARNING] .... at net.minecraft.world.inventory.ContainerWorkbench.a(ContainerWorkbench.java:87)
[WARNING] .... at net.minecraft.world.inventory.ContainerWorkbench.lambda$slotsChanged$0(ContainerWorkbench.java:98)
[WARNING] .... at net.minecraft.world.inventory.ContainerAccess.lambda$execute$0(ContainerAccess.java:61)
[WARNING] .... at net.minecraft.world.inventory.ContainerAccess$2.a(ContainerAccess.java:48)
[WARNING] .... at net.minecraft.world.inventory.ContainerAccess.a(ContainerAccess.java:60)
[WARNING] .... at net.minecraft.world.inventory.ContainerWorkbench.a(ContainerWorkbench.java:97)
[WARNING] .... at net.minecraft.world.inventory.InventoryCrafting.setItem(InventoryCrafting.java:141)
[WARNING] .... at net.minecraft.world.inventory.Slot.set(Slot.java:61)
[WARNING] .... at org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryView.setItem(CraftInventoryView.java:53)
[WARNING] .... at net.minecraft.world.inventory.Container.b(Container.java:444)
[WARNING] .... at net.minecraft.world.inventory.Container.a(Container.java:339)
[WARNING] .... at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2678)
[WARNING] .... at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(PacketPlayInWindowClick.java:50)
[WARNING] .... at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(PacketPlayInWindowClick.java:11)
[WARNING] .... at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:36)
[WARNING] .... at net.minecraft.server.TickTask.run(TickTask.java:18)
[WARNING] .... at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149)
[WARNING] .... at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23)
[WARNING] .... at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1340)
[WARNING] .... at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:193)
[WARNING] .... at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122)
[WARNING] .... at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1319)
[WARNING] .... at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1312)
[WARNING] .... at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132)
[WARNING] .... at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1273)
[WARNING] .... at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1184)
[WARNING] .... at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[WARNING] .... at java.base/java.lang.Thread.run(Unknown Source)
[ERROR] .... [CustomCrafting] -------- WHAT HAPPENED? Please report! --------

Yeaahhh, I don't know what happened.

WolfyScript commented 3 years ago

I am not exactly sure why this happens. It seems to be happening because of a missing or corrupted biome.

There isn't really anything I can do in my code to fix it. I assume you are using the Biome condition for some of your recipes, so a temporary fix would be to not use that condition.

I will research the issue. Maybe I can find a fix or related issue, etc.

WolfyScript commented 3 years ago

I found this issue having the same exact error using WorldEdit https://github.com/PaperMC/Paper/issues/6205

It does seem like there is an invalid biome in some chunks, where the crafting table is placed. You could try to fix the biomes somehow... I am not sure how, or don't use the Biome recipe condition.

Pixelcraftian commented 3 years ago

Strange, the recipe doesn't use the biome recipe condition. Will it just happen to every recipe if one recipe has it?

On Fri, 6 Aug 2021 at 16:26, WolfyScript @.***> wrote:

I found this issue having the same exact error using WorldEdit PaperMC/Paper#6205 https://github.com/PaperMC/Paper/issues/6205

It does seem like there is an invalid biome in some chunks, where the crafting table is placed. You could try to fix the biomes somehow... I am not sure how, or don't use the Biome recipe condition.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WolfyScript/CustomCrafting-Wiki/issues/38#issuecomment-894336736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEJHQ4FFALFMRROQPRRD6Z3T3P5KBANCNFSM5BU4DMAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

WolfyScript commented 3 years ago

Do you have any recipe that is using that condition? Because if there is one recipe between that uses it, it won't work.

DenaryDev commented 3 years ago

Hello, do you have a CavesAndCliffs datapack on your server? In my case, a similar problem was precisely because of him

WolfyScript commented 2 years ago

Closing this issue, because it is resolved. A possible reason for anyone coming across this issue is the CavesAndCliffs datapack that messes with the biomes, especially if you remove the datapack again without creating a new world.