This commit is contained in:
nossr50 2024-11-04 19:05:41 -08:00
parent 04007f6dbc
commit 406a7ba694
3 changed files with 6 additions and 5 deletions

View File

@ -1,11 +1,12 @@
Version 2.2.024 Version 2.2.024
Fixed a bug where Giga Drill breaker was giving out more loot than intended Fixed errors when Fishing or using Shake ability
Significant optimizations made to reading new chunks for mcMMO Significant optimizations made to reading new chunks for mcMMO
Significant optimizations to most block interactions in mcMMO code Significant optimizations to most block interactions in mcMMO code
Fixed a horrendous edge case where Tree Feller could cause a lot of lag
Notes: Notes:
Got a bit carried away and started to optimize stuff. Part of this update focused on optimization, there's improvements of around 30% in CPU time for most code involving block interactions in mcMMO, which happens to be most code in mcMMO.
I was able to make Tree Feller way faster with optimizations in this update, I tested with a custom gigantic tree that had over 200,000 blocks felled (huge) and it only took 4 seconds total, in the previous version of mcMMO this would take over 2-3 minutes. One of the optimizations made in this update removes an edge case where Tree Feller could cause a lot of lag, but the optimizations really are across the board in regards to any abilities that interact with blocks.
Version 2.2.023 Version 2.2.023
Compatibility with Minecraft 1.21.3 Compatibility with Minecraft 1.21.3

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<version>2.2.024-SNAPSHOT</version> <version>2.2.024</version>
<name>mcMMO</name> <name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url> <url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm> <scm>

View File

@ -42,7 +42,6 @@ public class ExcavationManager extends SkillManager {
excavationBlockCheck(blockState.getBlock()); excavationBlockCheck(blockState.getBlock());
} }
public void excavationBlockCheck(Block block) { public void excavationBlockCheck(Block block) {
int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.EXCAVATION, block.getType()); int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.EXCAVATION, block.getType());
requireNonNull(block, "excavationBlockCheck: block cannot be null"); requireNonNull(block, "excavationBlockCheck: block cannot be null");
@ -135,6 +134,7 @@ public class ExcavationManager extends SkillManager {
*/ */
public void gigaDrillBreaker(Block block) { public void gigaDrillBreaker(Block block) {
excavationBlockCheck(block); excavationBlockCheck(block);
excavationBlockCheck(block);
SkillUtils.handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(), SkillUtils.handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(),
mcMMO.p.getGeneralConfig().getAbilityToolDamage()); mcMMO.p.getGeneralConfig().getAbilityToolDamage());