Skip to content

Conversation

@Purdze
Copy link
Contributor

@Purdze Purdze commented Jan 27, 2026

Summary

  • add frozen_ticks field to track freeze duration
  • send DATA_FROZEN_TICKS metadata to clients for visual freeze effect
  • freeze ticks increase by 1/tick in powder snow, decrease by 2/tick outside
  • deal 1 freeze damage every 40 ticks when fully frozen (140 ticks)
  • add freeze immunity for snow golems, strays, polar bears, wither, wither skeletons

Fixes #795

/// Check if this entity type is immune to freezing
/// In vanilla: snow golems, strays, polar bears, wither, wither skeletons
pub fn is_freeze_immune(&self) -> bool {
std::ptr::eq(self.entity_type, &EntityType::SNOW_GOLEM)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag FREEZE_IMMUNE_ENTITY_TYPES should be used here

- add frozen_ticks field to track freeze duration
- send DATA_FROZEN_TICKS metadata to clients for visual effect
- freeze ticks increase by 1/tick in powder snow, decrease by 2/tick outside
- deal 1 freeze damage every 40 ticks when fully frozen (140 ticks)
- add freeze immunity for snow golems, strays, polar bears, wither, wither skeletons
/// Uses the `minecraft:freeze_immune_entity_types` tag
pub fn is_freeze_immune(&self) -> bool {
self.entity_type
.is_tagged_with("minecraft:freeze_immune_entity_types")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this you should use .has_tag(&tag::EntityType::MINECRAFT_FREEZE_IMMUNE_ENTITY_TYPES)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting frozen makes you stay frozen forever

2 participants