Skip to content
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

Players can move slappers #176

Closed
ManiakMCPE opened this issue Aug 31, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@ManiakMCPE
Copy link

commented Aug 31, 2018

Please make it so when players shoot a slapper with punch it won't move them. This is a very annoying bug.

@mikemike17347

This comment has been minimized.

Copy link

commented Sep 30, 2018

and what the permissions

@SleepSpace9

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

I've just created a fix for this issue, but at the moment of creating the PR I thought it should be configurable by a setting whether the entity can be moved or not.
There are many possible ways, e.g. create an extra plugin that cancels EntityMotionEvents of Slappers. (would be simple for non-devs and doesn't need an extra config). And / or just create a new SlapperMotionEvent and let devs cancel this event if needed. What do you think?

@jojoe77777

This comment has been minimized.

Copy link
Owner

commented Jan 25, 2019

Slappers should never be "moved", only teleported specifically
Processing motion should be easily overrideable (not a word?) in the entity classes (SlapperHuman, SlapperEntity)

also I haven't looked into this issue so I don't know if it's caused by 3rd party plugins?

@SleepSpace9

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2019

In my case Explosion::ExplodeB() (https://github.com/pmmp/PocketMine-MP/blob/3.5/src/pocketmine/level/Explosion.php#L199) moves Slappers, no matter if EntityDamageEvent is cancelled or not. The impact is calculated regardless of the event so $entity->setMotion() will always be triggered.
My concern is that, if we cancel EntityMotionEvent we won't have a possibility to use Entity::SetMotion() on slapper entities by another plugin (EDIT: without overriding setMotion() in an inherited Slapper class).

@jojoe77777

This comment has been minimized.

Copy link
Owner

commented Jan 25, 2019

Slappers are supposed to be stationary NPCs, if someone wants to do something else with them they can figure it out themselves

@SleepSpace9

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2019

Ok, then the fix should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.