From 209bc43f8536d0302f61d51f501faf83f2cf528b Mon Sep 17 00:00:00 2001 From: Misode Date: Thu, 19 Oct 2023 02:54:50 +0200 Subject: [PATCH] Effect changes in 1.20.2 --- minecraft/block/beacon.nbtdoc | 42 +------------- minecraft/entity/effectcloud.nbtdoc | 4 +- .../entity/mob/breedable/mooshroom.nbtdoc | 10 ++-- minecraft/entity/mob/mod.nbtdoc | 2 +- minecraft/entity/projectile/arrow.nbtdoc | 2 +- minecraft/item/potion.nbtdoc | 4 +- minecraft/item/suspiciousstew.nbtdoc | 12 ++-- minecraft/util/effect.nbtdoc | 58 +++++-------------- 8 files changed, 33 insertions(+), 101 deletions(-) diff --git a/minecraft/block/beacon.nbtdoc b/minecraft/block/beacon.nbtdoc index 3b39319..e4a0d96 100644 --- a/minecraft/block/beacon.nbtdoc +++ b/minecraft/block/beacon.nbtdoc @@ -4,47 +4,9 @@ compound Beacon extends super::BlockEntity { /// The number of levels from the pyramid Levels: int, /// The primary potion effect of the beacon - Primary: EffectId, + primary_effect: id(minecraft:mob_effect), /// The secondary potion effect of the beacon - Secondary: EffectId -} - -/// Numerical ids for effects -enum(int) EffectId { - None = -1, - Speed = 1, - Slowness = 2, - Haste = 3, - MiningFatigue = 4, - Strength = 5, - InstantHealth = 6, - InstantDamage = 7, - JumpBoost = 8, - Nausea = 9, - Regeneration = 10, - Resistance = 11, - FireResistance = 12, - WaterBreathing = 13, - Invisibility = 14, - Blindness = 15, - NightVision = 16, - Hunger = 17, - Weakness = 18, - Poison = 19, - Wither = 20, - HealthBoost = 21, - Absorption = 22, - Saturation = 23, - Glowing = 24, - Levitation = 25, - Luck = 26, - UnLuck = 27, - SlowFalling = 28, - ConduitPower = 29, - DolphinsGrace = 30, - BadOmen = 31, - HeroOfTheVillage = 32, - Darkness = 33 + secondary_effect: id(minecraft:mob_effect) } Beacon describes minecraft:block[minecraft:beacon]; diff --git a/minecraft/entity/effectcloud.nbtdoc b/minecraft/entity/effectcloud.nbtdoc index 2166711..be8015e 100644 --- a/minecraft/entity/effectcloud.nbtdoc +++ b/minecraft/entity/effectcloud.nbtdoc @@ -28,7 +28,7 @@ compound EffectCloud extends super::EntityBase { /// The default potion effect Potion: id(minecraft:potion), /// The potion effects that get applied on use - Effects: [PotionEffect] + effects: [PotionEffect] } -EffectCloud describes minecraft:entity[minecraft:area_effect_cloud]; \ No newline at end of file +EffectCloud describes minecraft:entity[minecraft:area_effect_cloud]; diff --git a/minecraft/entity/mob/breedable/mooshroom.nbtdoc b/minecraft/entity/mob/breedable/mooshroom.nbtdoc index b5438ee..eebf458 100644 --- a/minecraft/entity/mob/breedable/mooshroom.nbtdoc +++ b/minecraft/entity/mob/breedable/mooshroom.nbtdoc @@ -1,12 +1,10 @@ -use ::minecraft::util::EffectId; +use ::minecraft::item::suspiciousstew::SuspiciousEffect; compound Mooshroom extends super::Breedable { /// The type of the mooshroom Type: Type, - /// The effect that the mooshroom gives to suspicious stew - EffectId: EffectId, - /// The duration of the suspicious stew effect - EffectDuration: int + /// The effects that the mooshroom gives to suspicious stew + stew_effects: SuspiciousEffect[] } enum(string) Type { @@ -14,4 +12,4 @@ enum(string) Type { Brown = "brown" } -Mooshroom describes minecraft:entity[minecraft:mooshroom]; \ No newline at end of file +Mooshroom describes minecraft:entity[minecraft:mooshroom]; diff --git a/minecraft/entity/mob/mod.nbtdoc b/minecraft/entity/mob/mod.nbtdoc index 740ab93..7c5e060 100644 --- a/minecraft/entity/mob/mod.nbtdoc +++ b/minecraft/entity/mob/mod.nbtdoc @@ -59,7 +59,7 @@ compound LivingEntity extends super::EntityBase { /// The mob's attributes Attributes: [Attribute], /// The active potion effects on the mob - ActiveEffects: [PotionEffect], + active_effects: [PotionEffect], /// Whether the mob should have an AI NoAI: boolean, /// The team to join when the mob is spawned diff --git a/minecraft/entity/projectile/arrow.nbtdoc b/minecraft/entity/projectile/arrow.nbtdoc index a189631..537bf20 100644 --- a/minecraft/entity/projectile/arrow.nbtdoc +++ b/minecraft/entity/projectile/arrow.nbtdoc @@ -37,7 +37,7 @@ compound Arrow extends ArrowBase { /// calculated as `RED << 16 | GREEN << 8 | BLUE`. Each of these fields must be between 0 and 255, inclusive Color: int, /// The custom potion effects to give to the hit entity - CustomPotionEffects: [PotionEffect], + custom_potion_effects: [PotionEffect], /// The name of the default potion effect Potion: id(minecraft:potion), /// The color of the arrow's particles diff --git a/minecraft/item/potion.nbtdoc b/minecraft/item/potion.nbtdoc index c383001..bd80502 100644 --- a/minecraft/item/potion.nbtdoc +++ b/minecraft/item/potion.nbtdoc @@ -3,10 +3,10 @@ use ::minecraft::util::PotionEffect; /// An item that has a potion effect compound EffectItem extends super::ItemBase { /// A list of the potion effects that will be used with this item - CustomPotionEffects: [PotionEffect], + custom_potion_effects: [PotionEffect], /// The name of the default potion effect Potion: id(minecraft:potion), /// Color of this item /// calculated as `RED << 16 | GREEN << 8 | BLUE`. Each of these fields must be between 0 and 255, inclusive CustomPotionColor: int -} \ No newline at end of file +} diff --git a/minecraft/item/suspiciousstew.nbtdoc b/minecraft/item/suspiciousstew.nbtdoc index b6da541..87ddd98 100644 --- a/minecraft/item/suspiciousstew.nbtdoc +++ b/minecraft/item/suspiciousstew.nbtdoc @@ -1,15 +1,13 @@ -use ::minecraft::util::EffectId; - /// A suspicious stew item compound SuspiciousStew extends super::ItemBase { /// The effects this stew will give - Effects: [Effect] + effects: [SuspiciousEffect] } /// A suspicious stew effect -compound Effect { +compound SuspiciousEffect { /// The id of the effect - EffectId: EffectId, + id: id(minecraft:mob_effect), /// The duration of the effect in ticks - EffectDuration: int @ 1.. -} \ No newline at end of file + duration: int @ 1.. +} diff --git a/minecraft/util/effect.nbtdoc b/minecraft/util/effect.nbtdoc index 1ad266d..da23577 100644 --- a/minecraft/util/effect.nbtdoc +++ b/minecraft/util/effect.nbtdoc @@ -1,51 +1,25 @@ /// A single potion effect compound PotionEffect { - Id: EffectId, + id: id(minecraft:mob_effect), /// Whether the effect particles are semi-transparent (like with a Beacon) - Ambient: boolean, - Amplifier: byte, - Duration: int, + ambient: boolean, + amplifier: byte, + duration: int, /// A lower amplifier effect of the same type. - HiddenEffect: PotionEffect, + hidden_effect: PotionEffect, /// Whether the effect particles should be shown - ShowParticles: boolean, + show_particles: boolean, /// Whether the effect icon should be shown - ShowIcon: boolean + show_icon: boolean, + factor_calculation_data: FactorData } -/// Numerical ids for effects -enum(int) EffectId { - Speed = 1, - Slowness = 2, - Haste = 3, - MiningFatigue = 4, - Strength = 5, - InstantHealth = 6, - InstantDamage = 7, - JumpBoost = 8, - Nausea = 9, - Regeneration = 10, - Resistance = 11, - FireResistance = 12, - WaterBreathing = 13, - Invisibility = 14, - Blindness = 15, - NightVision = 16, - Hunger = 17, - Weakness = 18, - Poison = 19, - Wither = 20, - HealthBoost = 21, - Absorption = 22, - Saturation = 23, - Glowing = 24, - Levitation = 25, - Luck = 26, - UnLuck = 27, - SlowFalling = 28, - ConduitPower = 29, - DolphinsGrace = 30, - BadOmen = 31, - HeroOfTheVillage = 32, - Darkness = 33 +compound FactorData { + padding_duration: int @ 0.., + factor_start: float, + factor_target: float, + factor_current: float, + ticks_active: int @ 0.., + factor_previous_frame: float, + had_effect_last_tick: boolean }