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

ExprTarget - Fix not being able to delete target entity #2696

Closed
wants to merge 5 commits into from
Closed

ExprTarget - Fix not being able to delete target entity #2696

wants to merge 5 commits into from

Conversation

ShaneBeee
Copy link
Contributor

Description

This PR is to fix an issue with deleting a target entity.
When running the code:

delete target entity of player

nothing happens. This fixes that, win win for everyone 👍


Target Minecraft Versions: any
Requirements: none
Related Issues: #2695

…tity

- the change mode DELETE was preventing you from actually deleting a target entity
@ShaneBeee ShaneBeee changed the title ExprTarget - fix an issue with not being able to delete the target en… ExprTarget - Fix not being able to delete target entity Dec 14, 2019
@ShaneBeee
Copy link
Contributor Author

Closing this for now, needs a re-work

@ShaneBeee ShaneBeee closed this Dec 14, 2019
@ShaneBeee ShaneBeee reopened this Dec 14, 2019
@ShaneBeee ShaneBeee added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Dec 14, 2019
@bensku
Copy link
Member

bensku commented Dec 15, 2019

What does deleting targets of other entities do? Does it delete them, or just make the targeting entity target something else?

@ShaneBeee
Copy link
Contributor Author

What does deleting targets of other entities do? Does it delete them, or just make the targeting entity target something else?

It just sets their target as null, and Im thinking they must just randomly pick another target.
I tested with the a zombie, something like:

on target:
    if entity is a zombie:
        if target of entity is a player:
            delete target of entity

the zombie just stood there and ignored me.

@bensku
Copy link
Member

bensku commented Dec 27, 2019

The issue with this PR is that it will cause remove effect to do different things depending on whose target is removed. If a code (e.g. function) accidentally got a player as parameter, unexpected entity removal could happen.

@ShaneBeee
Copy link
Contributor Author

The issue with this PR is that it will cause remove effect to do different things depending on whose target is removed. If a code (e.g. function) accidentally got a player as parameter, unexpected entity removal could happen.

Very good point. I'm going to close this for now and try think of a new way to go about doing this.

@ShaneBeee ShaneBeee closed this Jan 3, 2020
@ShaneBeee ShaneBeee deleted the fix/delete-target-entity branch January 3, 2020 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants