fix instant_health id, rename OtherEffects to OtherEffect

This commit is contained in:
Bixilon 2022-12-09 22:48:17 +01:00
parent 9b98853b16
commit 4e1a4fb3b4
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
4 changed files with 25 additions and 25 deletions

View File

@ -15,7 +15,7 @@ package de.bixilon.minosoft.data.registries.effects
import de.bixilon.minosoft.data.registries.effects.damage.DamageEffect
import de.bixilon.minosoft.data.registries.effects.mining.MiningEffect
import de.bixilon.minosoft.data.registries.effects.other.OtherEffects
import de.bixilon.minosoft.data.registries.effects.other.OtherEffect
import de.bixilon.minosoft.data.registries.effects.vision.VisionEffect
import de.bixilon.minosoft.data.registries.integrated.IntegratedRegistry
@ -40,14 +40,14 @@ object IntegratedStatusEffects : IntegratedRegistry<StatusEffectType>(
VisionEffect.Nausea,
VisionEffect.NightVision,
OtherEffects.BadOmen,
OtherEffects.ConduitPower,
OtherEffects.Glowing,
OtherEffects.HeroOfTheVillage,
OtherEffects.Hunger,
OtherEffects.Invisibility,
OtherEffects.Luck,
OtherEffects.Saturation,
OtherEffects.Unluck,
OtherEffects.WaterBreathing,
OtherEffect.BadOmen,
OtherEffect.ConduitPower,
OtherEffect.Glowing,
OtherEffect.HeroOfTheVillage,
OtherEffect.Hunger,
OtherEffect.Invisibility,
OtherEffect.Luck,
OtherEffect.Saturation,
OtherEffect.Unluck,
OtherEffect.WaterBreathing,
)

View File

@ -31,7 +31,7 @@ interface DamageEffect {
}
object InstantHealth : StatusEffectType(), DamageEffect, CompanionResourceLocation, Colored, BeneficalEffect, InstantEffect {
override val RESOURCE_LOCATION = minecraft("instand_health")
override val RESOURCE_LOCATION = minecraft("instant_health")
override val color = 0xF82423.asRGBColor()
}

View File

@ -22,55 +22,55 @@ import de.bixilon.minosoft.data.text.formatting.color.Colored
import de.bixilon.minosoft.data.text.formatting.color.RGBColor.Companion.asRGBColor
import de.bixilon.minosoft.util.KUtil.minecraft
interface OtherEffects {
interface OtherEffect {
object WaterBreathing : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object WaterBreathing : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("water_breathing")
override val color = 0x2E5299.asRGBColor()
}
object Invisibility : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object Invisibility : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("invisibility")
override val color = 0x7F8392.asRGBColor()
}
object Hunger : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, HarmfulEffect {
object Hunger : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, HarmfulEffect {
override val RESOURCE_LOCATION = minecraft("hunger")
override val color = 0x587653.asRGBColor()
}
object Saturation : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object Saturation : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("saturation")
override val color = 0xF82423.asRGBColor()
}
object Glowing : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, NeutralEffect {
object Glowing : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, NeutralEffect {
override val RESOURCE_LOCATION = minecraft("glowing")
override val color = 0x94A061.asRGBColor()
}
object Luck : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object Luck : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("luck")
override val color = 0x339900.asRGBColor()
}
object Unluck : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, HarmfulEffect {
object Unluck : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, HarmfulEffect {
override val RESOURCE_LOCATION = minecraft("unluck")
override val color = 0xC0A44D.asRGBColor()
}
object ConduitPower : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object ConduitPower : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("conduit_power")
override val color = 0x1DC2D1.asRGBColor()
}
object BadOmen : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, NeutralEffect {
object BadOmen : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, NeutralEffect {
override val RESOURCE_LOCATION = minecraft("bad_omen")
override val color = 0x0B6138.asRGBColor()
}
object HeroOfTheVillage : StatusEffectType(), OtherEffects, CompanionResourceLocation, Colored, BeneficalEffect {
object HeroOfTheVillage : StatusEffectType(), OtherEffect, CompanionResourceLocation, Colored, BeneficalEffect {
override val RESOURCE_LOCATION = minecraft("hero_of_the_village")
override val color = 0x44FF44.asRGBColor()
}

View File

@ -15,7 +15,7 @@ package de.bixilon.minosoft.gui.rendering.gui.hud.elements.hotbar
import de.bixilon.kotlinglm.vec2.Vec2i
import de.bixilon.kutil.observer.DataObserver.Companion.observe
import de.bixilon.minosoft.data.registries.effects.other.OtherEffects
import de.bixilon.minosoft.data.registries.effects.other.OtherEffect
import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer
import de.bixilon.minosoft.gui.rendering.gui.atlas.AtlasElement
import de.bixilon.minosoft.gui.rendering.gui.elements.Element
@ -146,7 +146,7 @@ class HotbarHungerElement(guiRenderer: GUIRenderer) : Element(guiRenderer), Poll
val hunger = healthCondition.hunger
val saturation = healthCondition.saturation
val hungerEffect = guiRenderer.renderWindow.connection.player.effects[OtherEffects.Hunger] != null
val hungerEffect = guiRenderer.renderWindow.connection.player.effects[OtherEffect.Hunger] != null
if (this.hunger == hunger && this.saturation == saturation && this.hungerEffect == hungerEffect) {
return false