ValMobile / RealisticSurvival

Realistic Survival - A unique Spigot/Paper plugin inspired by RLCraft that aims to enhance pure survival, adventuring and RPG, and immersion of vanilla Minecraft.
GNU General Public License v3.0
29 stars 9 forks source link

Cannot repair item using anvil or /repair command #19

Open favorit5503 opened 1 year ago

favorit5503 commented 1 year ago

❗ Checklist

📍 Description

Hi, i have a problem repairing items. For examaple i tried repair Fire Dragonsteel Pickaxe both with anvil and command and its seem like it works but after on hit it jumps back to the previous durability. Any ideas? Thanks. Plugin is the 1.2.4. Running on 1.19.2 paper

📑 Reproduction Steps

Get a Fire Dragonsteel Pickaxe Try to repair it using anvil or a /repair command. Hit once and the durability will fall back to the old state.

💡 Expected Behavior

After repairing the durability counter should reset from max value.

📷 Screenshots / Videos

No response

📜 Server Log

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.19.x

⭐ Realistic Survival version

1.2.4

🧭 Other plugins

No response

ValMobile commented 1 year ago

Hi, I recently released the build 1.2.5 DEV-0, which should fix this issue. Please test the build and let me know if the issue is fixed.

favorit5503 commented 1 year ago

Thank you, i will do that.

favorit5503 commented 1 year ago

Some of the items can be repaired now but we tested some dragonsteel items "dragonsteel fire pickaxe" the has still this problem.

ValMobile commented 1 year ago

Are you using an anvil or crafting table to repair or the /repair command? /repair is a command from another plugin (I'm guessing Essentials, so I'll need to add manual support for that).

favorit5503 commented 1 year ago

We tried it with anvil using dragonsteel ingot and /repair. And some info for /repair we use CMI instead of essentials.

ValMobile commented 1 year ago

Are there errors with both methods (/repair and anvil) or just with one? Also, does the issue exist for all dragonsteel items or just certain ones? When I tested the dev-build, I used a copper shovel from the notreepunching module, and it was working fine, but I did not check for custom items in other modules like ice and fire.

favorit5503 commented 1 year ago

So we tested only ice and fire weapons because we don't use the notreepunching module. Currently not working wapons that we are tested: Dragonbone Pickaxe, Fire Dragonsteel pick axe, Fire Dragonsteel Strengthened Crossbow, Fire Dragonsteel Shovel. This is the only thing i found working: Iced Dragonbone Strengthened Crossbow. No errors in console.

favorit5503 commented 1 year ago

We are using these modules. Baubles, SpartanWeaponry, SpartanandFire, IceandFire.

favorit5503 commented 1 year ago

Any news?

ValMobile commented 1 year ago

Hi, I've been focusing on adding compatibility with other plugins like WorldGuard and Realistic Seasons. I haven't gotten time to work on bug fixes.

ValMobile commented 1 year ago

I have some good news to share!

After performing some testing, I've determined that this bug is caused by my plugin not recognizing the correct repair materials. I've already programmed a fix, which will be released in the upcoming 1.2.5-DEV-1 build or official 1.2.5-RELEASE build, depending on when Minecraft releases 1.19.4. However, the fix may not work with /repair commands since CMI and similar plugins will handle repairing differently. I may ask for you to provide a copy of CMI later so I can confirm that my fix works for your plugins.

favorit5503 commented 1 year ago

Great news thanks i will test and report back :)

favorit5503 commented 1 year ago

I tried the 1.2.5-DEV-1 but i get this following error on startup

[16:05:02 INFO]: [RealisticSurvival] Enabling RealisticSurvival v1.2.5-DEV-1 [16:05:03 INFO]: [RealisticSurvival] §6[Realistic Survival] §fInitializing §bIceandFire §fmodule [16:05:03 INFO]: [RealisticSurvival] §6[Realistic Survival] §fInitializing §bSpartanWeaponry §fmodule [16:05:04 INFO]: [RealisticSurvival] §6[Realistic Survival] §fInitializing §bBaubles §fmodule [16:05:04 INFO]: [RealisticSurvival] §6[Realistic Survival] §fInitializing §bSpartanandFire §fmodule [16:05:05 INFO]: [RealisticSurvival] §7Registered §ewarming §7enchant! [16:05:05 INFO]: [RealisticSurvival] §7Registered §eozzy_liner §7enchant! [16:05:05 INFO]: [RealisticSurvival] §7Registered §ecooling §7enchant! [16:05:05 INFO]: [RealisticSurvival] §6[Realistic Survival] §fDetected §ePlaceholderAPI§f. Enabling integration! [16:05:05 ERROR]: Error occurred while enabling RealisticSurvival v1.2.5-DEV-1 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "me.val_mobile.data.RSVConfig.getConfig()" because the return value of "me.val_mobile.data.RSVModule.getUserConfig()" is null at me.val_mobile.utils.CharacterValues.(CharacterValues.java:86) ~[realisticsurvival-1.2.5-DEV-1.jar:?] at me.val_mobile.integrations.TemperatureThirstBarExpansion.(TemperatureThirstBarExpansion.java:19) ~[realisticsurvival-1.2.5-DEV-1.jar:?] at me.val_mobile.integrations.PAPI.(PAPI.java:15) ~[realisticsurvival-1.2.5-DEV-1.jar:?] at me.val_mobile.realisticsurvival.RealisticSurvivalPlugin.onEnable(RealisticSurvivalPlugin.java:126) ~[realisticsurvival-1.2.5-DEV-1.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[paper-1.19.3.jar:git-Paper-445] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.19.3.jar:git-Paper-445] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:560) ~[paper-1.19.3.jar:git-Paper-445] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:471) ~[paper-1.19.3.jar:git-Paper-445] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.19.3.jar:git-Paper-445] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.19.3.jar:git-Paper-445] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.19.3.jar:git-Paper-445] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.19.3.jar:git-Paper-445] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-445] at java.lang.Thread.run(Thread.java:833) ~[?:?] [16:05:05 INFO]: [RealisticSurvival] Disabling RealisticSurvival v1.2.5-DEV-1 [16:05:05 INFO]: [RealisticSurvival] §6[Realistic Survival] §fShutting down §bIceandFire §fmodule [16:05:05 INFO]: [RealisticSurvival] §6[Realistic Survival] §fShutting down §bSpartanandFire §fmodule [16:05:05 INFO]: [RealisticSurvival] §6[Realistic Survival] §fShutting down §bBaubles §fmodule [16:05:05 INFO]: [RealisticSurvival] §6[Realistic Survival] §fShutting down §bSpartanWeaponry §fmodule

favorit5503 commented 1 year ago

Latest Paper 1.19.3 #445

ValMobile commented 1 year ago

Oh, that bug is caused by Tough as Nails not being enabled. I forgot to add a check for that edge case. Btw, the fix does not exist currently. It will be added to the upcoming dev build.

favorit5503 commented 1 year ago

Ah ok no problem ill wait fot the next dev build then. I only wanted to experiment with the papi and report bugs back. I love the project and i want to help where i can to make it better.

ValMobile commented 1 year ago

Issue should be resolved as of 1.2.5-RELEASE. I did not test if it works with CMI's /repair command, however. Please let me know if it does/doesn't

favorit5503 commented 1 year ago

Hi, i will test it after its updated to 1.20.1 and report back.

favorit5503 commented 1 year ago

Hi. I tested the issue. /repair dosn't work the issue remains. i tested the anvil but i cant take out the item. Tried shift+click and nothing. Vanila items works. image

ValMobile commented 1 year ago

Ah, I figured the CMI repair command wouldn't work, but the anvil bug is strange. Could you post a screenshot of your plugins list? When I test the plugin bare-bones, repairing via anvil works correctly. I think a plugin conflict is causing the second issue.