-
-
Notifications
You must be signed in to change notification settings - Fork 18
Preserve Mob State After Lightining Strike #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Preserve Mob State After Lightining Strike #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding this as an optional config entry like settings.lightning-transforms-entities.preserve-entity-state: true
. The default should probably be false since I don't believe this is what happens when vanilla lightning entity conversion takes place.
That's because in Vanilla, the small built in list of transformations don't have anything to preserve, if anything I should report this to Mojang, let's say you have a pig that's frozen for NPC purposes, the lightning strike now clearing that flag exploits that mechanic |
I have added a flag to the logic. The mob state would be preserved only if |
I will once I get my new setup working. Please be patient! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
zombie: "skeleton"
to the entities section. Spawned a zombie with iron helmet and iron sword in, summoned lightning on it. Equipment was not retained. The option preserve-entity-state is true.
I think you're missing the methods to retain data in onLightningStrike(EntityDamageByEntityEvent event)
method. I noticed you only added those in EntityZapEvent which only triggers for mobs that are transformed with lightning in vanilla game.
This PR preserves the mob state like health, armour after lightining strike