DietmarKracht Posted May 16, 2021 Posted May 16, 2021 (edited) Is there a way to completely stop an entity from moving (including head, limbs...) for a certain amount of time? I have an effect that should freeze the entities. If i set their motion to 0 they can still move their legs or head. That effect is my effect and it should be able to be applied to all enemies. Edited May 16, 2021 by DietmarKracht Quote
ChampionAsh5357 Posted May 16, 2021 Posted May 16, 2021 I believe you can use Entity#canUpdate for that. Quote
DietmarKracht Posted May 16, 2021 Author Posted May 16, 2021 I don't think so, cuz i would need to modify vanilla entities for that. Quote
Luis_ST Posted May 16, 2021 Posted May 16, 2021 On 5/16/2021 at 5:53 PM, DietmarKracht said: I don't think so, cuz i would need to modify vanilla entities for that. Expand there is an event (EntityEvent.CanUpdate) 1 Quote
DietmarKracht Posted May 16, 2021 Author Posted May 16, 2021 So as far as i can see this event is not even used by forge. Also refering to the documentation it would not fit my need. Quote
ChampionAsh5357 Posted May 16, 2021 Posted May 16, 2021 (edited) On 5/16/2021 at 5:53 PM, DietmarKracht said: I don't think so, cuz i would need to modify vanilla entities for that. Expand Well yeah. Ticking is handled internally by the entities that's called from some function. The method was added by forge so the entity can be updated to not tick hence it can't do anything. So, yes, the method I provided should work as intended. Edited May 16, 2021 by ChampionAsh5357 Quote
DietmarKracht Posted May 16, 2021 Author Posted May 16, 2021 So i used a global list storing the entities affected by the freeze effect and manually ticked their effect in ServerTickEvent Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.