spears update

This commit is contained in:
nossr50
2025-12-14 13:40:04 -08:00
parent ee94189574
commit 7bd4e9afe7
4 changed files with 28 additions and 8 deletions

View File

@@ -1,13 +1,14 @@
Version 2.2.046
TODO: Investigate when right click air sends events for offhand
TODO: Unarmed XP gained from spear offhand interactions
Added Spears combat skill
Added Spears to repair.vanilla.yml and salvage.vanilla.yml (see notes)
Added permissions related to Spears
Added /spears skill command
Added Nautilus to taming XP in experience.yml
Added Camel_Husk to taming XP in experience.yml
Added Camel_Husk to combat XP in experience.yml
Added Parched to combat XP in experience.yml
Fixed bug where converting from SQL to FlatFile would not copy data for tridents, crossbows, maces, or spears
(Codebase) Added dockerized unit tests for SQL databases (see notes)
(Codebase) Added docker-based unit tests for SQL databases (see notes)
(Codebase) Large refactor to both SQLDatabaseManager and FlatFileDatabaseManager
(Codebase) Database related errors are now more descriptive and have had their logging improved
@@ -16,9 +17,15 @@ Version 2.2.046
If you want to update salvage/repair configs the easy way, you simply can delete these config files to have mcMMO regenerate them with the new entries.
If you don't want to delete them, you can find the default values for these config files in the defaults folder at plugins\mcMMO\defaults after running this mcMMO update at least once.
You can use this default file to copy paste if you please.
If you compile mcMMO you will likely run into errors during unit tests for SQL databases, this is because they now rely on docker being present on the system to load up test containers.
New SQL database unit tests have been added which leverage test containers to test against real installs of MySQL/MariaDB, which require Docker (or an equivalent) to run.
If you'd rather not install docker simply just add -DskipTests to your maven instructions when compiling, this doesn't change anything about mcMMO it just skips running through the unit tests during the build.
Docker is ONLY required for developers compiling mcMMO from source code and ONLY for running SQL-related unit tests.
mcMMO itself does NOT require Docker to run, and servers using prebuilt releases are completely unaffected.
New SQL database unit tests use Testcontainers to spin up temporary MySQL/MariaDB instances for testing purposes.
These containers are created at test time and are never used at runtime.
If you compile mcMMO locally and do not have Docker installed, SQL-related unit tests may fail.
In this case, you can safely compile with -DskipTests to skip unit tests entirely.
Skipping tests has no impact on mcMMO functionality when running on a server.
Known Issues:
I ran into an issue where having a spear in the offhand while the main hand is empty causes attacks to be incorrectly classified as unarmed. This allows unarmed abilities to apply to spear damage. As a temporary measure, Ive disabled unarmed skills from applying to combat when a spear is equipped in the offhand while I investigate a more robust solution.
Version 2.2.045
Green Thumb now replants some crops it was failing to replant before (see notes)

View File

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

View File

@@ -3,6 +3,7 @@ package com.gmail.nossr50.util.skills;
import static com.gmail.nossr50.datatypes.experience.XPGainReason.PVP;
import static com.gmail.nossr50.util.AttributeMapper.MAPPED_MOVEMENT_SPEED;
import static com.gmail.nossr50.util.MobMetadataUtils.hasMobFlag;
import static com.gmail.nossr50.util.Permissions.canUseSubSkill;
import static com.gmail.nossr50.util.skills.ProjectileUtils.isCrossbowProjectile;
import com.gmail.nossr50.config.experience.ExperienceConfig;
@@ -349,6 +350,10 @@ public final class CombatUtils {
}
final SpearsManager spearsManager = mmoPlayer.getSpearsManager();
if (canUseSubSkill(player, SubSkillType.SPEARS_SPEAR_MASTERY)) {
boostedDamage += spearsManager.getSpearMasteryBonusDamage()
* mmoPlayer.getAttackStrength();
}
// Apply Limit Break DMG
if (canUseLimitBreak(player, target, SubSkillType.SPEARS_SPEARS_LIMIT_BREAK)) {
@@ -357,7 +362,6 @@ public final class CombatUtils {
* mmoPlayer.getAttackStrength());
}
// TODO: Apply any other damage boosts for spears here
event.setDamage(boostedDamage);
@@ -428,6 +432,11 @@ public final class CombatUtils {
double boostedDamage = event.getDamage();
// TODO: Temporary hack to avoid unintended spear / unarmed interactions
if (ItemUtils.isSpear(player.getInventory().getItemInOffHand())) {
return;
}
final McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
//Make sure the profiles been loaded

View File

@@ -588,6 +588,7 @@ Experience_Values:
Taming:
Animal_Taming:
Camel: 1300
Camel_Husk: 1300
Sniffer: 1500
Snifflet: 900
Llama: 1200
@@ -607,12 +608,14 @@ Experience_Values:
Axolotl: 600
Frog: 900
Nautilus: 1700
Zombie_Nautilus: 1700
Combat:
Multiplier:
Animals: 1.0
Armadillo: 1.1
Creeper: 4.0
Skeleton: 3.0
Parched: 2.5
Spider: 2.0
Giant: 4.0
Zombie: 2.0
@@ -690,6 +693,7 @@ Experience_Values:
Sniffer: 1.1
Snifflet: 1.1
Camel: 1.2
Camel_Husk: 1.25
Bogged: 2.0
Breeze: 4.0
Armor_Stand: 0.0