From cd0f50b66e5096e9b7371b306985869ee6dbb103 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Fri, 20 Dec 2024 20:25:36 -0800 Subject: [PATCH 1/2] item/suspicious_stew_type.go: Add new types --- server/item/suspicious_stew_type.go | 35 ++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/server/item/suspicious_stew_type.go b/server/item/suspicious_stew_type.go index 766c3e57c..1efac77aa 100644 --- a/server/item/suspicious_stew_type.go +++ b/server/item/suspicious_stew_type.go @@ -11,8 +11,8 @@ type StewType struct { stewType } -// NightVisionStew returns suspicious stew night vision effect. -func NightVisionStew() StewType { +// NightVisionPoppyStew returns suspicious stew night vision effect. +func NightVisionPoppyStew() StewType { return StewType{0} } @@ -26,8 +26,8 @@ func WeaknessStew() StewType { return StewType{2} } -// BlindnessStew returns suspicious stew blindness effect. -func BlindnessStew() StewType { +// BlindnessBluetStew returns suspicious stew blindness effect. +func BlindnessBluetStew() StewType { return StewType{3} } @@ -61,9 +61,24 @@ func WitherStew() StewType { return StewType{9} } +// NightVisionTorchflowerStew returns suspicious stew night vision effect. +func NightVisionTorchflowerStew() StewType { + return StewType{10} +} + +// BlindnessEyeblossomStew returns suspicious stew blindness effect. +func BlindnessEyeblossomStew() StewType { + return StewType{11} +} + +// NauseaStew returns suspicious stew nausea effect. +func NauseaStew() StewType { + return StewType{12} +} + // StewTypes ... func StewTypes() []StewType { - return []StewType{NightVisionStew(), JumpBoostStew(), WeaknessStew(), BlindnessStew(), PoisonStew(), SaturationDandelionStew(), SaturationOrchidStew(), FireResistanceStew(), RegenerationStew(), WitherStew()} + return []StewType{NightVisionPoppyStew(), JumpBoostStew(), WeaknessStew(), BlindnessBluetStew(), PoisonStew(), SaturationDandelionStew(), SaturationOrchidStew(), FireResistanceStew(), RegenerationStew(), WitherStew(), NightVisionTorchflowerStew(), BlindnessEyeblossomStew(), NauseaStew()} } type stewType uint8 @@ -77,19 +92,17 @@ func (s stewType) Uint8() uint8 { func (s stewType) Effects() []effect.Effect { var effects []effect.Effect switch s.Uint8() { - case 0: + case 0, 10: effects = append(effects, effect.New(effect.NightVision, 1, time.Second*4)) case 1: effects = append(effects, effect.New(effect.JumpBoost, 1, time.Second*4)) case 2: effects = append(effects, effect.New(effect.Weakness, 1, time.Second*7)) - case 3: + case 3, 11: effects = append(effects, effect.New(effect.Blindness, 1, time.Second*6)) case 4: effects = append(effects, effect.New(effect.Poison, 1, time.Second*10)) - case 5: - effects = append(effects, effect.New(effect.Saturation, 1, time.Second*3/10)) - case 6: + case 5, 6: effects = append(effects, effect.New(effect.Saturation, 1, time.Second*3/10)) case 7: effects = append(effects, effect.New(effect.FireResistance, 1, time.Second*2)) @@ -97,6 +110,8 @@ func (s stewType) Effects() []effect.Effect { effects = append(effects, effect.New(effect.Regeneration, 1, time.Second*6)) case 9: effects = append(effects, effect.New(effect.Wither, 1, time.Second*6)) + case 12: + effects = append(effects, effect.New(effect.Nausea, 1, time.Second*7)) default: panic("should never happen") } From 5bc1b7e2aa44cf6817b638528fc98ece8e3e4837 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Fri, 20 Dec 2024 20:27:30 -0800 Subject: [PATCH 2/2] item/suspicious_stew_type.go: Correct effect durations --- server/item/suspicious_stew_type.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/item/suspicious_stew_type.go b/server/item/suspicious_stew_type.go index 1efac77aa..e4489f2d5 100644 --- a/server/item/suspicious_stew_type.go +++ b/server/item/suspicious_stew_type.go @@ -93,23 +93,23 @@ func (s stewType) Effects() []effect.Effect { var effects []effect.Effect switch s.Uint8() { case 0, 10: - effects = append(effects, effect.New(effect.NightVision, 1, time.Second*4)) + effects = append(effects, effect.New(effect.NightVision, 1, time.Second*5)) case 1: - effects = append(effects, effect.New(effect.JumpBoost, 1, time.Second*4)) + effects = append(effects, effect.New(effect.JumpBoost, 1, time.Second*5)) case 2: effects = append(effects, effect.New(effect.Weakness, 1, time.Second*7)) case 3, 11: effects = append(effects, effect.New(effect.Blindness, 1, time.Second*6)) case 4: - effects = append(effects, effect.New(effect.Poison, 1, time.Second*10)) + effects = append(effects, effect.New(effect.Poison, 1, time.Second*11)) case 5, 6: effects = append(effects, effect.New(effect.Saturation, 1, time.Second*3/10)) case 7: - effects = append(effects, effect.New(effect.FireResistance, 1, time.Second*2)) + effects = append(effects, effect.New(effect.FireResistance, 1, time.Second*3)) case 8: - effects = append(effects, effect.New(effect.Regeneration, 1, time.Second*6)) + effects = append(effects, effect.New(effect.Regeneration, 1, time.Second*7)) case 9: - effects = append(effects, effect.New(effect.Wither, 1, time.Second*6)) + effects = append(effects, effect.New(effect.Wither, 1, time.Second*7)) case 12: effects = append(effects, effect.New(effect.Nausea, 1, time.Second*7)) default: