NCBPFluffyBear / FluffyMachines

A Slimefun4 addon that brings a variety of machines and tools to Slimefun
https://thebusybiscuit.github.io/builds/NCBPFluffyBear/FluffyMachines/master/
GNU General Public License v3.0
23 stars 39 forks source link

What does it problem? #118

Closed YouKlike closed 2 years ago

YouKlike commented 2 years ago

[11:00:43 ERROR]: [FluffyMachines] You can report it here: https://github.com/SlimeTraditionalTranslation/FluffyMachines/issues [11:00:43 ERROR]: [FluffyMachines] An Error occurred while trying to create a BlockMenu java.lang.NumberFormatException: Cannot parse null string at java.lang.Integer.parseInt(Integer.java:630) ~[?:?] at java.lang.Integer.parseInt(Integer.java:786) ~[?:?] at io.ncbpfluffybear.fluffymachines.items.MiniBarrel.getCapacity(MiniBarrel.java:74) ~[FluffyMachines - EFI 80 (git d37e7).jar:?] at io.ncbpfluffybear.fluffymachines.items.Barrel.buildMenu(Barrel.java:233) ~[FluffyMachines - EFI 80 (git d37e7).jar:?] at io.ncbpfluffybear.fluffymachines.items.MiniBarrel.buildMenu(MiniBarrel.java:39) ~[FluffyMachines - EFI 80 (git d37e7).jar:?] at io.ncbpfluffybear.fluffymachines.items.Barrel$1.newInstance(Barrel.java:97) ~[FluffyMachines - EFI 80 (git d37e7).jar:?] at me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset.lambda$newInstance$0(BlockMenuPreset.java:258) ~[Slimefun4 - TEA 231 (git 2f8e1).jar:?] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.1.jar:git-Purpur-1551] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.1.jar:git-Purpur-1551] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1227) ~[purpur-1.18.1.jar:git-Purpur-1551] at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:322) ~[purpur-1.18.1.jar:git-Purpur-1551] at java.lang.Thread.run(Thread.java:833) ~[?:?]

NCBPFluffyBear commented 2 years ago

Hi, I think its very likely that the issue was caused by someone tampering with the max-size value of a Mini-Barrel. This error would have occurred if the value was changed to a non-integer value. As far as I know, my code prevents players from entering any value besides an integer, so there shouldn't be a bug there (hopefully).

There are also a few issues about your PR that I would like to address:

  1. It looks like you meant to submit an issue, not a pull request. From what I can see, none of the code has been modified logically.
  2. While I have nothing against forks, if you do make a pull request, please keep it clean and only include logical code changes. I can see all of the translations in the request.
  3. If this is an issue and you are certain that nobody has tampered with the max-size, please try to reproduce the issue and let me know what value was inserted into the max-size field. Further instructions on providing me with a concise bug report can be found on the issue template.

If you did mean to submit a pull request, please let me know.