Skip to content

Commit

Permalink
Merge branch 'master' into update
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Nov 4, 2024
2 parents d289720 + 3aaff19 commit e85bac4
Show file tree
Hide file tree
Showing 58 changed files with 1,475 additions and 1,814 deletions.
22 changes: 16 additions & 6 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Version 2.2.024
Fixed a bug where Giga Drill breaker was giving out more drop chance than intended
Significant optimizations made to reading new chunks for mcMMO
Significant optimizations to most block interactions in mcMMO code

Notes:
Got a bit carried away and started to optimize stuff.
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.


Version 2.2.023
Compatibility with Minecraft 1.21.3
(API) add causingPlayer to McMMOReplaceVanillaTreasureEvent and update Fish Event to use it (thanks bobcat4848 and Jacob Cuomo)
Expand Down Expand Up @@ -2560,7 +2570,7 @@ Version 2.1.38
Version 2.1.37
Fixed a potential IndexOutOfBoundsException when informing a disconnected player that their Blast Mining was off CD
Updated hu_HU locale (thanks andris)

Version 2.1.36
Updated German locale (Thanks OverCrave)
Fixed a bug preventing Villagers from giving combat XP
Expand Down Expand Up @@ -3548,7 +3558,7 @@ Version 1.3.13
+ Added displaying bonus perks on skill commands
+ Added config option to disable gaining Acrobatics XP from dodging lightning
+ Added missing skill guides. They're finally here!
+ Added more localization
+ Added more localization
+ Added a very secret easter egg
= Fix issue with Sand/Gravel tracking
= Fix possible NPE when using the PartyAPI to add a player to a party that doesn't exist.
Expand Down Expand Up @@ -3645,7 +3655,7 @@ Version 1.3.11
= Fixed bug where mcMMO could throw NPE errors if trees cut down were from a custom mod and had an id of 17
= Fixed dupe bug where mcMMO would ignore other block-protection plugins for various abilities
= Fixed NPE with hardcore mode's vampirism

Version 1.3.10
+ Added 1.3.1 compatibility
+ Added permission node for Iron Grip ability (mcmmo.ability.unarmed.irongrip)
Expand Down Expand Up @@ -3907,7 +3917,7 @@ Version 1.3.02
Version 1.3.01
= Fixed bug where Tree Feller had no cooldown
= Fixed bug with activating Skull Splitter after using Tree Feller

Version 1.3.00
+ Added ability to customize drops for Excavation skill (treasures.yml)
+ Added ability to customize drops for Fishing skill (treasures.yml)
Expand Down Expand Up @@ -3971,7 +3981,7 @@ Version 1.3.00
- Removed unused settings from config.yml (HP Regen)
- Removed Nether Brick from Mining XP Tables
- Removed Stone Brick from Mining XP Tables

Version 1.2.12
- Fixed issue that caused terrible MySQL performance and negative XP on levelup (Issue #134)
- Fixed addxp command taking xprate and skill modifiers into account
Expand Down Expand Up @@ -4980,7 +4990,7 @@ Version 0.5.9
Version 0.5.8

Fixed bug where players inventories would dupe during combat

Version 0.5.7

Fixed monsters instant killing players
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.2.023</version>
<version>2.2.024-SNAPSHOT</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>
Expand Down
16 changes: 11 additions & 5 deletions src/main/java/com/gmail/nossr50/api/ExperienceAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1154,15 +1154,19 @@ public static void addXpFromBlocks(ArrayList<BlockState> blockStates, McMMOPlaye
}

/**
* Will add the appropriate type of XP from the block to the player based on the material of the blocks given if it matches the given skillType
* Will add the appropriate type of XP from the block to the player based on the material of the blocks given
* if it matches the given skillType
* @param blockStates the blocks to reward XP for
* @param mcMMOPlayer the target player
* @param skillType target primary skill
*/
public static void addXpFromBlocksBySkill(ArrayList<BlockState> blockStates, McMMOPlayer mcMMOPlayer, PrimarySkillType skillType) {
public static void addXpFromBlocksBySkill(ArrayList<BlockState> blockStates, McMMOPlayer mcMMOPlayer,
PrimarySkillType skillType) {
for(BlockState bs : blockStates) {
if (ExperienceConfig.getInstance().getXp(skillType, bs.getType()) > 0) {
mcMMOPlayer.applyXpGain(skillType, ExperienceConfig.getInstance().getXp(skillType, bs.getType()), XPGainReason.PVE, XPGainSource.SELF);
mcMMOPlayer.applyXpGain(skillType,
ExperienceConfig.getInstance().getXp(skillType, bs.getType()),
XPGainReason.PVE, XPGainSource.SELF);
}
}
}
Expand All @@ -1175,7 +1179,8 @@ public static void addXpFromBlocksBySkill(ArrayList<BlockState> blockStates, McM
public static void addXpFromBlock(BlockState blockState, McMMOPlayer mcMMOPlayer) {
for(PrimarySkillType skillType : PrimarySkillType.values()) {
if (ExperienceConfig.getInstance().getXp(skillType, blockState.getType()) > 0) {
mcMMOPlayer.applyXpGain(skillType, ExperienceConfig.getInstance().getXp(skillType, blockState.getType()), XPGainReason.PVE, XPGainSource.SELF);
mcMMOPlayer.applyXpGain(skillType, ExperienceConfig.getInstance().getXp(
skillType, blockState.getType()), XPGainReason.PVE, XPGainSource.SELF);
}
}
}
Expand All @@ -1188,7 +1193,8 @@ public static void addXpFromBlock(BlockState blockState, McMMOPlayer mcMMOPlayer
*/
public static void addXpFromBlockBySkill(BlockState blockState, McMMOPlayer mcMMOPlayer, PrimarySkillType skillType) {
if (ExperienceConfig.getInstance().getXp(skillType, blockState.getType()) > 0) {
mcMMOPlayer.applyXpGain(skillType, ExperienceConfig.getInstance().getXp(skillType, blockState.getType()), XPGainReason.PVE, XPGainSource.SELF);
mcMMOPlayer.applyXpGain(skillType, ExperienceConfig.getInstance().getXp(skillType, blockState.getType()),
XPGainReason.PVE, XPGainSource.SELF);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/gmail/nossr50/chat/ChatManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.text.StringUtils;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.chat.SignedMessage;
import net.kyori.adventure.text.TextComponent;
import org.bukkit.command.ConsoleCommandSender;
import org.jetbrains.annotations.NotNull;
Expand Down
Loading

0 comments on commit e85bac4

Please sign in to comment.