-
Notifications
You must be signed in to change notification settings - Fork 0
Effect Components
The following documentation outlines the data-driven JSON properties required to configure custom effects within the EnchantmentCore library. All scalar properties utilize Minecraft's LevelBasedValue system for dynamic evaluation based on enchantment levels.
Calculates and assigns a fire duration to an entity.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
duration |
LevelBasedValue |
Yes | - | Amount of time (in seconds) the entity is set on fire. |
Codec
public static final MapCodec<SetFireDurationEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(DURATION).forGetter(SetFireDurationEffect::duration)
).apply(instance, SetFireDurationEffect::new));Template
{
"type": "enchantment_core:set_fire_duration",
"duration": 5.0
}Spawns an explosion centered on a target entity or at a specific world coordinate.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
chance |
LevelBasedValue |
No | 1.0 |
Probability (0.0 to 1.0) of the explosion triggering. |
explosion |
ExplosionDefinition |
Yes | - | An embedded object defining the physical explosion properties. |
Codec
public static final MapCodec<ExplosionEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.optionalFieldOf(CHANCE, LevelBasedValue.constant(1.0F)).forGetter(ExplosionEffect::chance),
ExplosionDefinition.CODEC.fieldOf(EXPLOSION).forGetter(ExplosionEffect::explosion)
).apply(instance, ExplosionEffect::new));Template
{
"type": "enchantment_core:explode",
"chance": 1.0,
"explosion": {}
}| Property | Type | Required | Default | Description |
|---|---|---|---|---|
radius |
LevelBasedValue |
Yes | - | Block radius of the blast calculation. |
create_fire |
Boolean |
No | false |
Whether the explosion ignites surrounding blocks. |
damage_entities |
Boolean |
No | true |
Whether the explosion inflicts entity damage. |
interaction |
String |
No | "block" |
Explosion block interaction type (none, block, mob, tnt, trigger). |
immune_filter |
ContextPredicate |
No | - | Loot context criteria to exclude specific entities from blast damage. |
small_particles |
ParticleOptions |
No | minecraft:explosion |
Particle rendering definition for the explosion. |
large_particles |
ParticleOptions |
No | minecraft:explosion_emitter |
Particle rendering definition for large blast radiuses. |
sound |
SoundEvent |
No | minecraft:entity.generic.explode |
Event ID for the explosion audio. |
Codec
public static final Codec<ExplosionDefinition> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(RADIUS).forGetter(ExplosionDefinition::radius),
Codec.BOOL.optionalFieldOf(CREATE_FIRE, false).forGetter(ExplosionDefinition::createFire),
Codec.BOOL.optionalFieldOf(DAMAGE_ENTITIES, true).forGetter(ExplosionDefinition::damageEntities),
ExplosionInteraction.CODEC.optionalFieldOf(EXPLOSION_INTERACTION, ExplosionInteraction.BLOCK).forGetter(ExplosionDefinition::interaction),
ContextAwarePredicate.CODEC.optionalFieldOf(IMMUNE_FILTER).forGetter(ExplosionDefinition::immuneFilter),
ParticleTypes.CODEC.optionalFieldOf(SMALL_PARTICLES).forGetter(ExplosionDefinition::smallParticles),
ParticleTypes.CODEC.optionalFieldOf(LARGE_PARTICLES).forGetter(ExplosionDefinition::largeParticles),
BuiltInRegistries.SOUND_EVENT.holderByNameCodec().optionalFieldOf(SOUND).forGetter(ExplosionDefinition::sound)
).apply(instance, ExplosionDefinition::new));Template
{
"radius": 3.0,
"create_fire": false,
"damage_entities": true,
"interaction": "block",
"immune_filter": {},
"small_particles": "minecraft:explosion",
"large_particles": "minecraft:explosion_emitter",
"sound": "minecraft:entity.generic.explode"
}Directly modifies entity health or absorption values.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
amount |
LevelBasedValue |
Yes | - | Total health points restored or absorption granted. |
healing_type |
String |
Yes | - | Mode of healing (HEALING or ABSORPTION). |
max_absorption |
LevelBasedValue |
No | - | Hard cap limit when using ABSORPTION. Will expand max capacity attribute if needed. |
Codec
public static final MapCodec<HealingEntityEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(AMOUNT).forGetter(HealingEntityEffect::amount),
HealingType.CODEC.fieldOf(HEALING_TYPE).forGetter(HealingEntityEffect::healingType),
LevelBasedValue.CODEC.optionalFieldOf(MAX_ABSORPTION).forGetter(HealingEntityEffect::maxAbsorption)
).apply(instance, HealingEntityEffect::new));Template
{
"type": "enchantment_core:healing",
"amount": 2.0,
"healing_type": "healing",
"max_absorption": 10.0
}Forces the target entity to eject equipped items.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
chance |
LevelBasedValue |
Yes | - | Probability (0.0 to 1.0) of a successful disarm per trigger. |
slots |
List<String> |
Yes | - | Equipment slots eligible for forced removal. Bypasses curse of binding. |
pick_one_randomly |
Boolean |
No | false |
If true, selects only one valid item from the specified slots to drop. |
Codec
public static final MapCodec<DropItemEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(CHANCE).forGetter(DropItemEffect::chance),
EquipmentSlot.CODEC.listOf().fieldOf(SLOTS).forGetter(DropItemEffect::slots),
Codec.BOOL.optionalFieldOf(PICK_ONE_RANDOMLY, false).forGetter(DropItemEffect::pickOneRandomly)
).apply(instance, DropItemEffect::new));Template
{
"type": "enchantment_core:drop_item",
"chance": 0.5,
"slots": ["mainhand"],
"pick_one_randomly": false
}Adjusts standard damage cooldowns.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
amount |
LevelBasedValue |
Yes | - | Ticks added to the entity's i-frame cooldown. Evaluated as an integer. |
Codec
public static final MapCodec<InvulnerabilityFrameModifierEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(AMOUNT).forGetter(InvulnerabilityFrameModifierEffect::amount)
).apply(instance, InvulnerabilityFrameModifierEffect::new));Template
{
"type": "enchantment_core:invulnerability_frame_modifier",
"amount": 10.0
}Generates localized kinetic impulses that pull or push entities while applying damage.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
strength |
LevelBasedValue |
Yes | - | Velocity strength of the kinetic push (positive) or pull (negative). Features a sigmoid falloff distance scaler. |
radius |
LevelBasedValue |
Yes | - | Evaluation radius constructing the Area of Effect volume. |
damage |
LevelBasedValue |
Yes | - | Absolute damage applied to entities captured in the Area of Effect. |
Codec
public static final MapCodec<AreaGravityDamageEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(STRENGTH).forGetter(AreaGravityDamageEffect::strength),
LevelBasedValue.CODEC.fieldOf(RADIUS).forGetter(AreaGravityDamageEffect::radius),
LevelBasedValue.CODEC.fieldOf(DAMAGE).forGetter(AreaGravityDamageEffect::damage)
).apply(instance, AreaGravityDamageEffect::new));Template
{
"type": "enchantment_core:area_gravity_damage",
"strength": 1.5,
"radius": 5.0,
"damage": 2.0
}Spawns an invisible tracking marker capable of triggering cyclic field evaluations.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
duration |
LevelBasedValue |
Yes | - | Complete lifespan (in ticks) before the anchor despawns. |
tick_rate |
LevelBasedValue |
No | 1.0 |
Evaluation frequency for nested field logic (in ticks). |
activation_delay |
LevelBasedValue |
No | 0.0 |
Initial delay period (in ticks) before cycles begin. |
active_phase |
LevelBasedValue |
No | 0.0 |
Defines how many ticks the field evaluates before resting (defaults to full duration if 0.0). |
rest_phase |
LevelBasedValue |
No | 0.0 |
Dead-zone duration between active phases. |
use_origin |
Boolean |
No | false |
If true, anchors to the effect origin coordinates rather than the target entity bounds. |
spell_field |
Object |
Yes | - | Complex embedded spell field topology/execution pipeline. Required dedicated API documentation. |
visual_config |
AnchorVisualObject |
No | - | Overrides invisible parameters to render custom models/textures directly on the anchor. |
Codec
public static final MapCodec<SummonSpellFieldAnchorEffect> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(DURATION).forGetter(SummonSpellFieldAnchorEffect::duration),
LevelBasedValue.CODEC.optionalFieldOf(TICK_RATE, LevelBasedValue.constant(1.0F)).forGetter(SummonSpellFieldAnchorEffect::tickRate),
LevelBasedValue.CODEC.optionalFieldOf(ACTIVATION_DELAY, LevelBasedValue.constant(0.0F)).forGetter(SummonSpellFieldAnchorEffect::activationDelay),
LevelBasedValue.CODEC.optionalFieldOf(ACTIVE_PHASE, LevelBasedValue.constant(0.0F)).forGetter(SummonSpellFieldAnchorEffect::activePhase),
LevelBasedValue.CODEC.optionalFieldOf(REST_PHASE, LevelBasedValue.constant(0.0F)).forGetter(SummonSpellFieldAnchorEffect::restPhase),
SpellFieldComponent.CODEC.fieldOf(SPELL_FIELD).forGetter(SummonSpellFieldAnchorEffect::spellField),
AnchorVisualConfig.CODEC.optionalFieldOf(VISUAL_CONFIG).forGetter(SummonSpellFieldAnchorEffect::visualConfig),
Codec.BOOL.optionalFieldOf(USE_ORIGIN, false).forGetter(SummonSpellFieldAnchorEffect::useOrigin)
).apply(instance, SummonSpellFieldAnchorEffect::new));Template
{
"type": "enchantment_core:summon_spell_field_anchor",
"duration": 100.0,
"tick_rate": 1.0,
"activation_delay": 0.0,
"active_phase": 0.0,
"rest_phase": 0.0,
"use_origin": false,
"spell_field": {},
"visual_config": {}
}AnchorVisualObject Properties:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
texture |
ResourceLocation |
No | - | Identifier path for custom rendering textures. |
model_id |
ResourceLocation |
No | - | Identifier path for custom loaded geometry. |
scale |
Float |
No | 1.0 |
Size scalar for the rendered asset. |
frame_count |
Integer |
No | 1 |
Total distinct UV animation frames in texture map. |
ticks_per_frame |
Integer |
No | 1 |
Duration to display each frame before advancing. |
tint |
Integer |
No | 0xFFFFFF |
Base RGB overlay map. |
Codec
public static final Codec<AnchorVisualConfig> CODEC = RecordCodecBuilder.create(instance -> instance.group(
ResourceLocation.CODEC.optionalFieldOf("texture").forGetter(AnchorVisualConfig::texture),
ResourceLocation.CODEC.optionalFieldOf("model_id").forGetter(AnchorVisualConfig::modelId),
Codec.FLOAT.optionalFieldOf("scale", 1.0F).forGetter(AnchorVisualConfig::scale),
Codec.INT.optionalFieldOf("frame_count", 1).forGetter(AnchorVisualConfig::frameCount),
Codec.INT.optionalFieldOf("ticks_per_frame", 1).forGetter(AnchorVisualConfig::ticksPerFrame),
Codec.INT.optionalFieldOf("tint", 0xFFFFFF).forGetter(AnchorVisualConfig::tint)
).apply(instance, AnchorVisualConfig::new));Template
{
"texture": "my_mod:textures/entity/spell/magic_circle.png",
"model_id": "my_mod:crystal_anchor",
"scale": 1.0,
"frame_count": 1,
"ticks_per_frame": 1,
"tint": 16777215
}Note: All items in this category must be wrapped inside a List<ConditionalEffect<T>> list.
Modifies underwater/fluid rendering distances.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
fluids |
List<Fluid> |
Yes | - | List or tag containing fluids applicable for modified rendering. |
fog_start |
LevelBasedValue |
Yes | - | Absolute shader start distance. |
fog_end_multiplier |
LevelBasedValue |
Yes | - | Scalar applied against total view distance configuring shader end limit. |
Codec
public static final Codec<FluidFogDensityEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
RegistryCodecs.homogeneousList(Registries.FLUID).fieldOf(FLUIDS).forGetter(FluidFogDensityEffect::fluids),
LevelBasedValue.CODEC.fieldOf(FOG_START).forGetter(FluidFogDensityEffect::fogStart),
LevelBasedValue.CODEC.fieldOf(FOG_END_MULTIPLIER).forGetter(FluidFogDensityEffect::fogEndMultiplier)
).apply(instance, FluidFogDensityEffect::new));Template
{
"fluids": "#minecraft:water",
"fog_start": 5.0,
"fog_end_multiplier": 2.0
}Overrides draw durations for stringed weapons.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
amount |
LevelBasedValue |
Yes | - | Absolute time reduction in seconds. Handled via negative injection into maximum draw timers. |
Codec
public static final Codec<BowChargeTimeEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(AMOUNT).forGetter(BowChargeTimeEffect::amount)
).apply(instance, BowChargeTimeEffect::new));Template
{
"amount": -0.5
}Executes spatial queries to lock onto entities and calculate course corrections in-flight.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
tracking_strength |
LevelBasedValue |
Yes | - | Absolute delta-movement adjustment strength toward targeted entity center. |
prioritize_head |
Boolean |
No | false |
Locks homing vector to entity eye-height tracking rather than feet bounds. |
arming_distance |
LevelBasedValue |
No | 0.0 |
Blocks travel distance required before homing evaluations initialize. |
min_distance |
LevelBasedValue |
No | 0.1 |
Proximity distance where homing steering halts tracking algorithms. |
max_distance |
LevelBasedValue |
No | 64.0 |
Initial targeting evaluation distance threshold. |
fov |
LevelBasedValue |
No | 360.0 |
Cone boundary restricting entity acquisition calculations based on original vector angle. |
turn_rate |
LevelBasedValue |
No | 10.0 |
Caps maximum angular adjustments allowed per evaluation tick. |
Codec
public static final Codec<HomingProjectileEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(TRACKING_STRENGTH).forGetter(HomingProjectileEffect::trackingStrength),
Codec.BOOL.optionalFieldOf(PRIORITIZE_HEAD, false).forGetter(HomingProjectileEffect::prioritizeHead),
LevelBasedValue.CODEC.optionalFieldOf(ARMING_DISTANCE, LevelBasedValue.constant(0.0f)).forGetter(HomingProjectileEffect::armingDistance),
LevelBasedValue.CODEC.optionalFieldOf(MIN_DISTANCE, LevelBasedValue.constant(0.1f)).forGetter(HomingProjectileEffect::minDistance),
LevelBasedValue.CODEC.optionalFieldOf(MAX_DISTANCE, LevelBasedValue.constant(64.0f)).forGetter(HomingProjectileEffect::maxDistance),
LevelBasedValue.CODEC.optionalFieldOf(FOV, LevelBasedValue.constant(360.0f)).forGetter(HomingProjectileEffect::fov),
LevelBasedValue.CODEC.optionalFieldOf(TURN_RATE, LevelBasedValue.constant(10.0f)).forGetter(HomingProjectileEffect::turnRate)
).apply(instance, HomingProjectileEffect::new));Template
{
"tracking_strength": 0.5,
"prioritize_head": false,
"arming_distance": 0.0,
"min_distance": 0.1,
"max_distance": 64.0,
"fov": 360.0,
"turn_rate": 10.0
}Calculates force vectors applied against external entities dragging them toward the projectile center.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
pull_strength |
LevelBasedValue |
Yes | - | Base magnetic force value applied as normalized delta-movement towards projectile. |
prioritize_head |
Boolean |
No | false |
Originates the target point computation toward entity head bounds. |
arming_distance |
LevelBasedValue |
No | 0.0 |
Travel distance required to engage magnetism zone. |
search_radius |
LevelBasedValue |
No | 16.0 |
Outer bound diameter for applying attractive forces to nearby entities. |
Codec
public static final Codec<MagneticProjectileEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(PULL_STRENGTH).forGetter(MagneticProjectileEffect::pullStrength),
Codec.BOOL.optionalFieldOf(PRIORITIZE_HEAD, false).forGetter(MagneticProjectileEffect::prioritizeHead),
LevelBasedValue.CODEC.optionalFieldOf(ARMING_DISTANCE, LevelBasedValue.constant(0.0f)).forGetter(MagneticProjectileEffect::armingDistance),
LevelBasedValue.CODEC.optionalFieldOf(SEARCH_RADIUS, LevelBasedValue.constant(16.0f)).forGetter(MagneticProjectileEffect::searchRadius)
).apply(instance, MagneticProjectileEffect::new));Template
{
"pull_strength": 0.5,
"prioritize_head": false,
"arming_distance": 0.0,
"search_radius": 16.0
}Evaluates reflection angles during solid block collision.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
max_bounces |
LevelBasedValue |
Yes | - | Hard limit tracking total recursive solid geometry reflections allowed. |
velocity_retention |
LevelBasedValue |
No | 0.8 |
Fraction of inbound velocity retained mapped against output reflection vector. |
Codec
public static final Codec<RicochetProjectileEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(MAX_BOUNCES).forGetter(RicochetProjectileEffect::maxBounces),
LevelBasedValue.CODEC.optionalFieldOf(VELOCITY_RETENTION, LevelBasedValue.constant(0.8f)).forGetter(RicochetProjectileEffect::velocityRetention)
).apply(instance, RicochetProjectileEffect::new));Template
{
"max_bounces": 3.0,
"velocity_retention": 0.8
}Calculates fragmentation spawning when specific impact triggers occur.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
generations |
LevelBasedValue |
Yes | - | Tracks recursive fragmentations allowed before final projectile deletion. |
amount |
LevelBasedValue |
Yes | - | Direct amount of secondary fragment projectiles spawned on detonation. |
spread_degrees |
LevelBasedValue |
No | 15.0 |
Cone angular variance utilized during vector initialization of spawned fragments. |
velocity_retention |
LevelBasedValue |
No | 0.5 |
Base velocity conversion metric copied from parent projectile to child. |
damage_retention |
LevelBasedValue |
No | 0.5 |
Fractional base damage metric copied from parent projectile to child. |
trigger_on_block |
Boolean |
No | true |
Shrapnel executes calculation on block strike events. |
trigger_on_entity |
Boolean |
No | true |
Shrapnel executes calculation on entity strike events. |
Codec
public static final Codec<ShrapnelProjectileEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(GENERATIONS).forGetter(ShrapnelProjectileEffect::generations),
LevelBasedValue.CODEC.fieldOf(AMOUNT).forGetter(ShrapnelProjectileEffect::amount),
LevelBasedValue.CODEC.optionalFieldOf(SPREAD_DEGREES, LevelBasedValue.constant(15.0f)).forGetter(ShrapnelProjectileEffect::spreadDegrees),
LevelBasedValue.CODEC.optionalFieldOf(VELOCITY_RETENTION, LevelBasedValue.constant(0.5f)).forGetter(ShrapnelProjectileEffect::velocityRetention),
LevelBasedValue.CODEC.optionalFieldOf(DAMAGE_RETENTION, LevelBasedValue.constant(0.5f)).forGetter(ShrapnelProjectileEffect::damageRetention),
Codec.BOOL.optionalFieldOf(TRIGGER_ON_BLOCK, true).forGetter(ShrapnelProjectileEffect::triggerOnBlock),
Codec.BOOL.optionalFieldOf(TRIGGER_ON_ENTITY, true).forGetter(ShrapnelProjectileEffect::triggerOnEntity)
).apply(instance, ShrapnelProjectileEffect::new));Template
{
"generations": 1.0,
"amount": 3.0,
"spread_degrees": 15.0,
"velocity_retention": 0.5,
"damage_retention": 0.5,
"trigger_on_block": true,
"trigger_on_entity": true
}Replaces raw drop output with smelted variants based on runtime recipe scanning.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
additional_tool_usage |
LevelBasedValue |
No | 0.0 |
Subtracts supplementary tool durability to balance free smelting operations. |
drop_xp |
Boolean |
No | true |
Processes standard block smelting experience drops utilizing accumulated fractions. |
Codec
public static final Codec<AutoSmeltEffect> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
LevelBasedValue.CODEC.optionalFieldOf(ADDITIONAL_TOOL_USAGE, LevelBasedValue.constant(0)).forGetter(AutoSmeltEffect::additionalToolUsage),
Codec.BOOL.optionalFieldOf(DROP_XP, true).forGetter(AutoSmeltEffect::dropXp)
).apply(instance, AutoSmeltEffect::new)
);Template
{
"additional_tool_usage": 0.0,
"drop_xp": true
}Evaluates modification equations altering raw integer experience orb drops.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
multiplier |
LevelBasedValue |
Yes | - | Constant scaling factor modifying total experience yield computations. |
Codec
public static final Codec<ExperienceYieldEffect> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
LevelBasedValue.CODEC.fieldOf(MULTIPLIER).forGetter(ExperienceYieldEffect::multiplier)
).apply(instance, ExperienceYieldEffect::new)
);Template
{
"multiplier": 2.0
}Evaluates targeting fields converting non-solid fluids into transient solid blocks underneath entity bounds.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
allowed_fluids |
List<Fluid> |
Yes | - | List or tag of fluids matching transient replacement criteria. |
speed_retention |
LevelBasedValue |
No | 1.0 |
Velocity retention scalar adjusting surface friction rules applied during traversal. |
Codec
public static final Codec<FluidWalkerEffect> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
RegistryCodecs.homogeneousList(Registries.FLUID).fieldOf(ALLOWED_FLUIDS).forGetter(FluidWalkerEffect::allowedFluids),
LevelBasedValue.CODEC.optionalFieldOf(SPEED_RETENTION, LevelBasedValue.constant(1.0F)).forGetter(FluidWalkerEffect::speedRetention)
).apply(instance, FluidWalkerEffect::new)
);Template
{
"allowed_fluids": "#minecraft:water",
"speed_retention": 1.0
}Modifies internal gravity evaluation arrays for entities fully submerged in specific zones.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
break_speed_multiplier |
LevelBasedValue |
No | 1.0 |
Constant adjusting penalty applied during submerged mining calculations. |
Codec
public static final Codec<BuoyancyEffect> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
LevelBasedValue.CODEC.optionalFieldOf(BREAK_SPEED_MULTIPLIER, LevelBasedValue.constant(1.0F)).forGetter(BuoyancyEffect::breakSpeedMultiplier)
).apply(instance, BuoyancyEffect::new)
);Template
{
"break_speed_multiplier": 1.0
}Calculates auxiliary item generation queries executing during specific interaction scopes.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
chance |
LevelBasedValue |
Yes | - | Standard probability constraint defining execution validity. |
target_blocks |
List<Block> |
Yes | - | Valid blocks or tags evaluating the bonus loot chance. |
reward_items |
List<Item> |
Yes | - | Direct list of specific item drops appended to extraction payloads. |
reward_experience |
Boolean |
No | false |
Tracks secondary flag toggling experience drop additions logic. |
Codec
public static final Codec<BonusLootEffect> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
LevelBasedValue.CODEC.fieldOf(CHANCE).forGetter(BonusLootEffect::chance),
RegistryCodecs.homogeneousList(Registries.BLOCK).fieldOf(TARGET_BLOCKS).forGetter(BonusLootEffect::targetBlocks),
RegistryCodecs.homogeneousList(Registries.ITEM).fieldOf(REWARD_ITEMS).forGetter(BonusLootEffect::rewardItems),
Codec.BOOL.optionalFieldOf(REWARD_EXPERIENCE, false).forGetter(BonusLootEffect::rewardExperience)
).apply(instance, BonusLootEffect::new)
);Template
{
"chance": 0.5,
"target_blocks": "#minecraft:ores",
"reward_items": "minecraft:diamond",
"reward_experience": false
}Manipulates vertical logic executing mid-air jumping procedures on non-grounded entity ticks.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
jumps |
EnchantmentValueEffect |
Yes | - | Absolute integer limiting mid-air evaluations available between ground resets. |
allow_elytra |
Boolean |
No | false |
Maintains multi-jump trigger access during fall flying evaluations. |
Codec
public static final Codec<MultiJumpEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
EnchantmentValueEffect.CODEC.fieldOf(JUMPS).forGetter(MultiJumpEffect::jumps),
Codec.BOOL.optionalFieldOf(ALLOW_ELYTRA, false).forGetter(MultiJumpEffect::allowElytra)
).apply(instance, MultiJumpEffect::new));Template
{
"jumps": 1.0,
"allow_elytra": false
}Evaluates final damage numbers applying direct inverse additions to specific health pools.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
multiplier |
LevelBasedValue |
Yes | - | Float scale evaluating total incoming damage directly back as health points. |
healing_type |
String |
Yes | - | Designates output sink routing (HEALING or ABSORPTION). |
max_absorption |
LevelBasedValue |
No | - | Caps absorption pool tracking limits during conversion. |
Codec
public static final Codec<DamageHealingEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(MULTIPLIER).forGetter(DamageHealingEffect::multiplier),
HealingType.CODEC.fieldOf(HEALING_TYPE).forGetter(DamageHealingEffect::healingType),
LevelBasedValue.CODEC.optionalFieldOf(MAX_ABSORPTION).forGetter(DamageHealingEffect::maxAbsorption)
).apply(instance, DamageHealingEffect::new));Template
{
"multiplier": 0.5,
"healing_type": "healing",
"max_absorption": 10.0
}Evaluates adjacent blocks allowing surface traversal behaviors replacing fall momentum paths.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
speed |
LevelBasedValue |
No | 1.0 |
Adjusts vertical ascent multiplier when calculating delta-movements. |
hold_on_crouch |
Boolean |
No | false |
Suspends applied gravity vectors when user explicitly sends crouch inputs. |
allowed_blocks |
List<Block> |
No | - | Re-routes default block logic tracking specific blocks or tags valid for wall climbing evaluations. |
Codec
public static final Codec<ClimbingEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.optionalFieldOf(SPEED, LevelBasedValue.constant(1.0F)).forGetter(ClimbingEffect::speed),
Codec.BOOL.optionalFieldOf(HOLD_ON_CROUCH, false).forGetter(ClimbingEffect::holdOnCrouch),
RegistryCodecs.homogeneousList(Registries.BLOCK).optionalFieldOf(ALLOWED_BLOCKS).forGetter(ClimbingEffect::allowedBlocks)
).apply(instance, ClimbingEffect::new));Template
{
"speed": 1.0,
"hold_on_crouch": false,
"allowed_blocks": "#minecraft:climbable"
}Hooks into rendering events injecting dynamic alpha modification based on target bounds.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
alpha_multiplier |
LevelBasedValue |
No | 0.0 |
Scaling rule calculating model visibility reduction. |
detection_mitigation |
LevelBasedValue |
No | - | Decreases absolute range scaling for mob acquisition computations mimicking stealth. |
Codec
public static final Codec<TransparencyEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.optionalFieldOf(ALPHA_MULTIPLIER, LevelBasedValue.constant(0.0F)).forGetter(TransparencyEffect::alphaMultiplier),
LevelBasedValue.CODEC.optionalFieldOf(DETECTION_MITIGATION).forGetter(TransparencyEffect::detectionMitigation)
).apply(instance, TransparencyEffect::new));Template
{
"alpha_multiplier": 0.5,
"detection_mitigation": 0.5
}Implements state-machine data logic tracking consecutive user actions for progressive modification outputs.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
max_streak |
LevelBasedValue |
Yes | - | Maximum internal counter limit before progressive values halt output modifications. |
increment |
LevelBasedValue |
Yes | - | Direct base addition per successful sequential event. |
timeout_ticks |
Integer |
No | 100 |
Defines tracking bounds indicating inactivity wipe events for current counters. |
Codec
public static final Codec<StreakEffect> CODEC = RecordCodecBuilder.create(instance -> instance.group(
LevelBasedValue.CODEC.fieldOf(MAX_STREAK).forGetter(StreakEffect::maxStreak),
LevelBasedValue.CODEC.fieldOf(INCREMENT).forGetter(StreakEffect::increment),
Codec.INT.optionalFieldOf(TIMEOUT_TICKS, 100).forGetter(StreakEffect::timeoutTicks)
).apply(instance, StreakEffect::new));Template
{
"max_streak": 5.0,
"increment": 1.0,
"timeout_ticks": 100
}Want to learn more about the configuration engine powering Enchantment Core?
Check out Config Understood, the official wiki for Config Overhauled, for a deep dive into dynamic property generation and state synchronization!