Combat+ Core
This is the core library mod and compatibility layer that allows the Combat+ series to function with an extremely high level of inter-mod compatibility.
View the collection on Modrinth here.
API Information
The library adds a number of utility methods and interfaces that make it easier to add unique weapons and enchantments to the game.
Any mod that makes use of these will be compatible with the Combat+ series.
Interfaces
- Melee Weapon
- Used for any melee weapon.
- Provides callbacks that trigger for fully charged attacks, critical attacks, and killing.
- Must implement a damage value.
- Dual Weapon
- Inherit from Melee Weapon, used for weapons which could be wielded in either hand and may support game-changing offhand enchantments.
- Additionally contains a method for offhand damage.
- CPCEnchantment
- Offers hooks for enchantments to perform actions for fully charged hits, critical hits, and killing.
- Offers a more advanced version of damage, where an enchantment of any slot can contribute to the damage bonus.
Enchantment Types
An item can only have one enchantment of each category (not including offhand enchantments).
- Additional Damage
- A more advanced version of vanilla damage enchantments.
- Any enchantment technically can increase damage, but this should mostly be done by Additional Damage enchantments unless there is a special circumstance.
- Additionally incompatible with vanilla's Damage Enchantments.
- Weapon Utility
- Enchantments that add some additional utility function to a weapon, or otherwise enhance its existing effects.
- Sweeping Edge would be a Weapon Utility.
- Aspect
- Enchantments that modify the state of the user or the target on hit.
- Fire Aspect would (obviously) be an Aspect.
- Offhand
- A misc group that is intended to apply to offhanded weapons.
- Largely incompatible with the other groups.
Datapack Information
To improve compatibility with mods outside of the Combat+ ecosystem, a series of datapack tags are available.
These tags are considered in various features of Combat+, such as eligibility for enchantments.
Item Tags
combat-plus:melee_weapon- These items are considered unimplemented Melee Weapons and will be eligible for enchantments that target Melee Weapons.
combat-plus:dual_weapon- This tag is included in the melee weapon tag.
- These items will be considered unimplemented dual weapons and will be eligble for relevant enchantments.
combat-plus:breaks_shields- These items can break shields.
Enchantment Tags
There is a corresponding tag for each enchantment type. This can be used by other modders or modpack makers to categorise other enchantments into the four groups.
Combat+ enchantments will be incompatible with enchantments that are in the same tag as their group.
For example a Weapon Utility enchantment is incompatible with any enchantment in the combat-plus:weapon_utility tag.
Game Rules
Combat+ Core adds two additional gamerules to modify vanilla weapon mechanics.
keepLoyaltyTridents- When true, loyalty tridents will not leave the inventory when thrown, nor can they be picked up or return to the thrower. Instead tridents will go on cooldown. Higher levels of loyalty will decrease the cooldown.
sweepingRequiresEnchantment- When true, the sweeping effect of a sword will only occur if the sword has the Sweeping Edge enchantment. This allows the player to decide whether sweeping should be considered a native property of the sword, or the product of an enchantment.
pvpEnchantmentModifier- Damaging enchantments can use the
combat-plus:gamerule_damagecomponent instead of vanilla's damage component. Damage of this type will be multiplied by this gamerule's value when dealt against players. This is for PvP balancing.
- Damaging enchantments can use the
lethalPoison- When true, poison will be able to kill players and mobs instead of leaving them on half a heart.
Showcase Video
All Versions
+ Add Version## Bugfixes
- [LilyLib] Fixed crash caused by rendering FlatParticles.
- Updated to Minecraft 1.21.11
- Updated to 1.21.10
## Additions
- New item data components:
combat-plus:melee_weapon- Holds two floats, weapon damage and offhand damage.
- All Melee and Dual weapons are expected to use this data component.
- Combat+ mods can use this component to acquire damage values for callbacks (interface values from MeleeWeapon should always be preferred).
combat-plus:cooldown_group- Takes an identifier and sets what group the item should use when on cooldown.
combat-plus:max_use_time- Determines how many ticks an item can be used for.
- This component was moved from Dual Swords.
- New enchantment component type: data component enchantment effects!
- Enchantments can grant temporary data components to items.
- The component is added when the item is enchanted and lost when the enchantment is removed.
- Currently supports:
- Cooldown Group
- Max Use Time
- Blocks Attacks
- New attribute: Protection Effectiveness
- Treated as a multiplier, this determines how effective protection enchantments are on the entity.
- Default value of 1 (normal effectiveness).
## Changes
- Callbacks for blocking attacks now accept a damage source instead of the attacking entity.
## Bugfixes
- Tridents are no longer unbreakable with KeepLoyaltyTridents.
- When using
KeepLoyaltyTridents, only tridents with Loyalty will go on cooldown.
## Additions
- Added new class for easily executing callbacks from an item.
- Added new interface, BlockingItem.
- Items with the ability to block attacks should implement this interface.
- It contains methods that allow the item to configure the nature of its blocking.
- Cooldown duration when disabled.
- How many ticks the item must be used for until it is actively blocking attacks.
- Callbacks
- Damaging the shield.
- Post-block actions.
- Added enchantment callback for post-block actions.
- Added enchantment context (for conditions) for post-block actions.
- In this context, the target is the owner of the enchanted item, the one who blocked the attack.
- Added debug shield item and debug blocking enchantment for developers.
- [LilyLib]** Enchantment descriptions now also generate a
.descriptionkey as well as the existing.desckey.
## Additions
- Added new class for easily executing callbacks from an item.
- Added new interface, BlockingItem.
- Items with the ability to block attacks should implement this interface.
- It contains methods that allow the item to configure the nature of its blocking.
- Cooldown duration when disabled.
- How many ticks the item must be used for until it is actively blocking attacks.
- Callbacks
- Damaging the shield.
- Post-block actions.
- Added enchantment callback for post-block actions.
- Added enchantment context (for conditions) for post-block actions.
- In this context, the target is the owner of the enchanted item, the one who blocked the attack.
- Added debug shield item and debug blocking enchantment for developers.
- [LilyLib]** Enchantment descriptions now also generate a
.descriptionkey as well as the existing.desckey.
## Additions
- Added new class for easily executing callbacks from an item.
- Added new interface, BlockingItem.
- Items with the ability to block attacks should implement this interface.
- It contains methods that allow the item to configure the nature of its blocking.
- Cooldown duration when disabled.
- How many ticks the item must be used for until it is actively blocking attacks.
- Callbacks
- Damaging the shield.
- Post-block actions.
- Added enchantment callback for post-block actions.
- Added enchantment context (for conditions) for post-block actions.
- In this context, the target is the owner of the enchanted item, the one who blocked the attack.
- Added debug shield item and debug blocking enchantment for developers.
- [LilyLib]** Enchantment descriptions now also generate a
.descriptionkey as well as the existing.desckey.
- Updated to 1.21.4 Minecraft.
- [LilyLib]** Added an equipment model datagen provider.
## Changes
- Updated to 1.21.3 Minecraft.
- [LilyLib]** Enchantment containers require a entity registry lookup.
## Additions
- Melee weapons now have a stack-aware version of
getWeaponDamage. - Dual weapons now have a stack-aware version of
getOffhandDamage.
## Additions
- Melee weapons now have a stack-aware version of
getWeaponDamage. - Dual weapons now have a stack-aware version of
getOffhandDamage.
- Added gamerule (
lethalPoison) to toggle whether poison can be lethal. - Includes new related damage type.
- Sweeping attacks now apply Combat+ post-charged hit effects to all affected entities.
- Enchanted Numerals now grants translation keys for 0 to 10.
- [LilyLib]** Added datagen provider for
assets/.../sounds.json - [LilyLib]** Added datagen provider for particle textures.
- [LilyLib]** Added wrapper provider for the Fabric language datagen provider.
- This provides common useful functions: adding enchantments with their descriptions (for inter-mod compatibility), and adding simple death translations.
## Changes
pvpEnchantmentModifiernow has a minimum value of 0.#combat-plus:standard_attacktag includes the vanillais_player_attacktag instead of the individual player attack.
For obvious reasons, version 3.0.0 contains breaking changes for almost everything.
# Brief Overview
Yes, this is the *brief* version...
Check [Github](https://github.com/Provismet/CombatPlus-Core/releases/tag/3.0.0-mc1.21) for the full details.
## Additions
- Combat+ Core now reveals LilyLib to dependent mods.
- LilyLib was already bundled in the jar, it's just made available now.
- LilyLib patch notes will be included in Combat+ patch notes.
- Added several new enchantment components types:
combat-plus:post_charged_attackcombat-plus:post_critical_attackcombat-plus:post_killcombat-plus:bonus_damage- So items that are not the primary weapon can increase damage too.
combat-plus:gamerule_damage- Damage dealt against players is modified by the new gamerule.
- This allows for world-based PvP balancing.
- New gamerule that modifies enchantment damage effectiveness against players.
- Extra Damage Enchantments and Extended Enchanting both had their seperate versions of this gamerule before. They have been moved into Combat+ now.
- Added a small library of common effects and conditions for enchantments.
- Added a new type of enchantment effect: Double Entity Effect
- This is used by the Combat+ components and allows for effects for consider two entities at once.
- Added two built-in resource packs:
- One provides Roman Numerals for enchantments with a level over 10 (up to 255).
- One replaces Roman Numerals for enchantment levels with plain numbers (up to 255).
- Vanilla Maces are considered melee weapons by Combat+.
- Added two new loot functions.
## Changes
- Sharpness, Smite, Bane of Arthropods, and Fire Aspect are now overriden entirely by Combat+ Core to change their supported item tags.
- Previously a mixin was used to change the tags instead.
- Smite and Bane of Arthropods use the new
combat-plus:gamerule_damagecomponent. - The enchantment types of Combat+ (Additional Damage, Offhand, Weapon Utility, Aspect) have been converted into enchantment tags.
- Combat+ Enchantment Helper methods have different parameters.
## Removals
- The entire old enchanting system. :(
## New Features From LilyLib
- Enchantment datagen provider
- DamageType datagen provider
- DamageType tag datagen provider
- Enchantment Containers
- Combines a registry key with an enchantment builder. Highly useful for eliminating code duplication if you need to bootstrap your enchantments.
- Also contains useful utility for getting registry entries of the enchantment.
- DamageType Containers
- Combines a registry key with a damage type. Highly useful for eliminating code duplication.
- Also has utility methods for generating damage sources.
- Fabric resource condition to only load certain things when in dev mode.
## Additions
- Development environments now have access to a debug enchantment and item, these use their callbacks for console logs. This is to help developers assess when callbacks are workings.
- Enchantments that use the Combat+ enchantability tags will now appear in the Creative Mode inventory.
## Additions
- Added abstract class for melee weapons.
- Added enchantability item tags for the 4 new item groups + primary versions of these tags.
- Vanilla enchantments now use Combat+ item tags for when appropriate.
- The Combat+ tags extend the vanilla ones.
- Added tag translations.
## Changes
- MeleeWeapon.getWeaponDamage now requires an ItemStack parameter.
- Combat+ enchantment classes can no longer use the vanilla damage method, the Combat+ version should be used instead.
- CombatTags has been renamed to CPCItemTags.
## Removals
- FabricASM is no longer used or included by Combat+. (Hurray!)
