Potential 1.18 Bug / Need help

Started by FooeyDooey on Tue, 06/14/2022 - 11:53

Topic category: Troubleshooting, bugs, and solutions

Last seen on 01:59, 21. Jun 2022
Joined Jun 2022

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Potential 1.18 Bug / Need help
Tue, 06/14/2022 - 11:53

     I have been developing a mod that relies heavily on Minecraft's block breaking mechanics, more specifically the speed at which you break blocks. I started developing this mod in mcreator's 1.17 version, but the problem only started after I updated to the 1.18 version.

     To explain the error that I am having I must first explain how Minecraft calculates the time it takes for a player to mine a block. To begin with, it first takes the block hardness value, for example let's say the hardness value is 100, and multiplies it by either 1.5(If the tool the player is using is able to harvest the block with a drop) or by 5(If the tool the player is using is unable to harvest the block with a drop). In our example, if the block being mined requires a diamond pickaxe to get a drop from it, and the player is using a diamond pickaxe, we would get value of 150 (from 100 * 1.5). Minecraft then takes this value and divides it by your tool's unique breaking speed to get the number of seconds that it will take for you to mine the block. Diamond tool's have a tool speed of 8, so 150/8 = 18.75 seconds to mine the block. You can read more in depth about this mechanic on the Minecraft wiki here --> Breaking – Minecraft Wiki (fandom.com) .

     Going back to my mod, after updating my mod to 1.18 every block made by mcreator has been calculating its breaking speed with a multiplier of 1.5 regardless of whether your tool has a high enough harvest level to acquire a drop. For example, if we tried to mine that same block from our previous example with an iron pick, and taking note that iron tools having a  breaking speed of 6, the total breaking time in vanilla Minecraft would be (100 * 5)/6 = 83.3 seconds. But when testing the block in the mcreator 1.18 version, the actual time it took to break the block was 25 seconds, which is (100 * 1.5)/6.

     I would greatly appreciate any help with this, as my entire mod relies solely on this one mechanic. Whether that help is pointing out a new feature from the update that is causing this change, or helping me spread awareness about this so that the bug can get fixed as soon as possible.