wgaylord / AutoCrafters

Bug tracker for AutoCrafters
2 stars 1 forks source link

Crafter breaks after being broken & Enchantments do nothing #19

Closed ksteckert closed 3 years ago

ksteckert commented 4 years ago

MC Version : 1.16.1 (PaperSpigot build 138)

Plugin Version : 2.0.2

The problem? : Enchantments don't work. Specifically, I have tried infinity, and it does not continuously craft items, only the first item is crafted when I flip on the lever. Also, when breaking the AutoCrafter the enchantment is gone-- it does not stay enchanted. Also the lore is gone after breaking it (picking it up), and it no longer functions as an AutoCrafter (despite it's name being AutoCrafter), it only functions as a dropper from that point on, it will no longer even craft things.

What you expect to happen : I expect the enchantment of Infinity to cause it to continuously output an item every 2 seconds (40 ticks as set in config.yml). I also expect the item to work after breaking & re-placing it in the world.

What actually happened : I placed the AutoCrafter in the crafting table with an Infinity book and got an Infinity AutoCrafter. I placed it in the world, with an input chest behind it, and output chest in front. I put a gold ingot inside the crafter, and a stack of gold nuggets in the input chest. I attached a lever to the autocrafter and flipped it on. Only one gold ingot went into the output chest. I checked the AutoCrafter, and it still had an ingot inside, and the stack of nuggets was reduced to 55 (it used 9). It did not continuously output gold ingots.

Steps to reproduce: See above.

When placing the item down in the world it does NOT have the enchantment glow. I'm not sure if that's intentional, but I figured it is worth mentioning. Breaking the item also removes it's lore, and it no longer functions as an AutoCrafter (only works as a dropper), but you can place is back on the crafting table with an infinity book and receive back an Infinity AutoCrafter, but without the lore-- and it doesn't work as an AutoCrafter (it just spits out the item inside it).

This is the ONLY autocrafting mod I've found that works at all. I've tried 5 other mods, and none of them work. At least this one works, but has to be pulsed. I can setup a clock with a switch to do the pulsing, so I guess it's not a really big deal. Since it's supposed to work with Infinity, I figured I'd file a bug report here for you.

wgaylord commented 4 years ago

Can you give anymore information about your setup? Possibly upload the data file?

ksteckert commented 4 years ago

I looked thru the server logs and found this exception if it helps:

java.lang.NullPointerException: null
    at com.jwgtechs.autocrafters.Events.onPlace(Events.java:49) ~[?:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor21.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.1.jar:git-Paper-138]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.1.jar:git-Paper-138]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.1.jar:git-Paper-138]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.1.jar:git-Paper-138]
    at org.bukkit.craftbukkit.v1_16_R1.event.CraftEventFactory.callBlockPlaceEvent(CraftEventFactory.java:373) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.ItemStack.placeItem(ItemStack.java:280) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.PlayerInteractManager.a(PlayerInteractManager.java:525) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1454) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.TickTask.run(SourceFile:18) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.MinecraftServer.aZ(MinecraftServer.java:1137) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.MinecraftServer.executeNext(MinecraftServer.java:1130) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1091) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1005) ~[patched_1.16.1.jar:git-Paper-138]
    at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-138]
    at java.lang.Thread.run(Thread.java:830) [?:?]
ksteckert commented 4 years ago

all my config files are defaults config::

blacklist: []
auto: 40
maxEff: -1

data.json:

{}

data.yml is completely blank

wgaylord commented 4 years ago

I am going to have to build paper to figure this out.

Can you try moving back to 2.0.1? That was before I did a fix for non-standard worlds which might be what broke. (I did test it but I may have not tested well enough.)

ksteckert commented 4 years ago

OK, I'll try it this weekend and get back to you.

wgaylord commented 4 years ago

Just wondering if it went any better?

I haven't had much time to try and debug this due to college classes.

Bananamannl commented 3 years ago

Well i know it's a bit late, but i tried this and it still resets the autocrafting ability in 2.0.1, i didn't test the infinitey thing though

Bananamannl commented 3 years ago

i have also found out that it doesn't seem to work in 2.0 if you pick it up and place it down again

wgaylord commented 3 years ago

I will take a look, haven't really had time to do a proper update recently so I will see if everything is working properly and if not fix it.

On Sun, Mar 14, 2021 at 1:37 PM Bananamannl @.***> wrote:

i have also found out that it doesn't seem to work in 2.0 if you pick it up and place it down again

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wgaylord/AutoCrafters/issues/19#issuecomment-798957067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQI3SLZRHBH6SVROMNV263TDT7ANANCNFSM4REAZFVA .

wgaylord commented 3 years ago

This seems to have been a issue with paper doing something incorrectly in the event system,(Returning a null where the API docs say it should never return null.) Closing for now as I am also working on a 1.17 update that should fix this if it still occurs.