作者:rebot | 分类:模组
Minecraft 版本: 26.1 26.1.1 26.1.2
平台: fabric
标签: equipment game-mechanics
A server-side Fabric mod that brings back 1.8-style combat to modern versions of Minecraft! Can additionally configure
default attributes for all entities and items and default item components.
This mod does not require client-side installation or the Fabric API (necessary Fabric API modules are bundled with the mod),
however, to configure attributes with a GUI, Mod Menu is required to open the configuration screen.
The default settings of this mod bring back 1.8-style combat. Additionally (since version 2.1), the following options
are configurable either via the options screen or the configuration file (see Configuration):
Please note that although changing item and entity defaults while in a world is possible and I've tried my best to make
it work as seamlessly as possible, it could potentially still lead to unexpected behaviour and (probably smaller) bugs.
CombatEdit uses different concepts for configuring itself:
This is the main way for players to configure the mod. Configurations made in the settings file take precedence over the
base profile and profile extension configurations, and the settings file determines which base profile is to be used.
For users, the main way to configure the settings is using the GUI screen accessible via ModMenu in the Mods list (by
clicking on the gear button once CombatEdit is selected). The settings file is saved in config/combatedit/settings.json
relative to the minecraft/server directory.
To configure these options on a server, you can create and save your configuration on the client using the configuration screen
and then upload the config file (in config/combatedit/settings.json) to the same directory inside the server directory.
Base profiles determine the main configuration for entity and item attributes. CombatEdit includes two base profiles:
combatedit:1_8_combat), which is enabled by default and sets entity and item attributes valuescombatedit:vanilla), which leaves default entity and item attributes untouched.Datapack creators can provide their own base profiles (see Datapacks) to create different base configurations.
Profile extensions allow adjusting the configuration of a base profile (such as adding addition item modifiers or overriding
others set in the base profile). They are aimed at mod developers who want to provide different item or entity settings for
base profiles (for example by changing damage values for the 1.8 Combat profile on custom items to compensate for the lack
of any Attack Cooldown as a balancing measure). See Mod developers for more information.
Both base profiles and profile extension can be included in a datapack. The following directory tree describes where to
place base profile and profile extension files.
data: the data directory within your datapack<your_namespace>: Your custom datapack namespacecombatedit: All CombatEdit-related datapack files reside within hereprofile_extensions: Contains profile extensions.<profile_namespace><profile_name>: Contains .json profile extension files extending the base profile<profile_namespace>:<profile_name>base_profiles: Contains base profile .json files. A file named <your_profile>.json created here will create<your_namespace>:<your_profile>.Mod developers can include base profiles in JSON format just like datapack creators by placing files inside their data
resource directory using the same directory structure as mentioned above for datapacks. Additionally, it is possible to
provide profile extensions programmatically: simply create a class implementing the
CombatEditInitListener interface and specify
this implementation as a new entrypoint with the name combatedit within your fabric.mod.json.
This section explains the JSON formats of the various configuration types. Sample datapacks for base profile and profile
extension creation can be found in the examples directory.
A base profile in JSON format is a JSON object containing the following keys:
name: The display name of your base profile. Can be a text component or a simple string.description: The description of your base profile. Can be a text component or a simple string.configuration: The feature configuration for this base profile. See Feature configuration.A profile extension in JSON format is a JSON object containing the following keys:
priority: An integer specifying the priority of this profile extension. A greater priority value results in thisconfiguration_overrides: A feature configuration specifying the overrides this extension makes. SeeThe feature configuration format is common among base profiles, profile extensions and the settings file. It has the
following keys:
configuration_version: An integer specifying the version of the feature configuration, which may change if breaking3.entity_attributes: An array of Entity attribute objects specifying the default attributes for anitem_attributes: An array of Item attribute objects specifying the default attribute modifiers foritem_components: An array of Item component objects specifying the default components for an item.enabled_sounds: A map of sound ID to boolean pairs specifying whether those sounds are enabled or not. Currently, theminecraft:entity.player.attack.nodamageminecraft:entity.player.attack.knockbackminecraft:entity.player.attack.weakminecraft:entity.player.attack.strongminecraft:entity.player.attack.sweepminecraft:entity.player.attack.critmisc_options: An object configuring Miscellaneous options.Entity attribute entries have the following structure:
entity_id: The identifier of the entity type to be modifiedbase_values: An array of attribute base value objects, which have the following keys:attribute: The identifier of the attribute whose value is changedbase_value: The base value to use for the specified attributeoverride_default: Boolean option. If set to true, the entity's default attributes are removed before applying theItem attribute entries have the following structure:
item_id: The identifier of the item to be modifiedmodifiers: An array of attribute modifier objects, which have the following structure:attribute: The attribute for which to add a modifiermodifier_id: A unique identifier for the attribute modifier. Optional, if not specified, a random identifier isvalue: The value for the modifieroperation: Operation type for the modifier. Can be one of the following:"add_value": Adds the value of this modifier to the base value of the attribute for the entity"add_multiplied_base": Multiplies the base value for the attribute by the specified value and adds the result to"add_multiplied_total": Multiplies the sum of the base value and all modifiers of type"add_multiplied_base" and adds the result to the total attribute valueslot: The slot in which the item has to be for the modifier to apply. Can be one of the following:"any": Applies in all slots"mainhand": Applies when the item is held in the main hand"offhand": Applies when the item is held in the off hand"hand": Applies when the item is held in any hand"feet": Applies when the item is equipped in the boots slot"legs": Applies when the item is equipped in the leggings slot"chest": Applies when the item is equipped in the chestplate slot"head": Applies when the item is equipped in the helmet slot"armor": Applies when the item is equipped in any armor slot (on players or animals)"body": Applies when the item is equipped on an animal"saddle": Applies when the item is equipped on a horse's saddle slotoverride_default: Boolean option. If set to true, the item's default attribute modifiers are removed before applyingItem component entries have the following structure:
item_id: The identifier of the item whose components are to be modifiedchanges: An array of component changes to be made, which have the following structure:component_type: The identifier of the component type for which to change the valuechange_type: The change to be made by this entry, which is either:"set" if a new value for this component type is to be set"remove" if the default value for this component is to be removed from the item entirelyvalue: The value to set for this component. Is optional if the component type does not have values or the change"remove"enable_1_8_knockback: A boolean specifying whether 1.8 knockback should be enabled instead of the default knockbackdisable_sweeping_without_enchantment: A boolean specifying whether sweeping effects should be disabled if the used请登录后举报
暂无评论,抢个沙发吧~