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

New Feature: expression to get block face from block interact event #67

Closed
TheBentoBox opened this issue Apr 28, 2016 · 6 comments
Closed
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Comments

@TheBentoBox
Copy link
Member

The PlayerInteractEvent on Spigot has a method called getBlockFace() which returns a BlockFace representing the side of the block that was clicked. It would be cool if, within the block left/right events in Skript, we could use %clicked block face% and %clicked block opposite face% to get the face that was clicked and the face opposite the one that was clicked as strings. You get the string of block face from the interact event (e being interact event) with e.getBlockFace().toString() and the opposite with e.getBlockFace().getOppositeFace().toString().

@bensku bensku added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label May 7, 2016
@TheBentoBox
Copy link
Member Author

Not one to do a -bump- normally, but any chance on getting this feature in one of the next releases when you get a chance? Would be very useful for doing directional things related to blocks, and should be fairly straightforward given the methods within the API for interact events (described in the first post).

@bensku
Copy link
Member

bensku commented Sep 16, 2016

Adding new data types is always major testing task, but I'll take look at that when I next have chance to add new features.

Intentory clicks, for example, vere bugged for few months until I in dev20 finally managed to fix last of those bugs.

@TheBentoBox
Copy link
Member Author

I understand. Whenever you do get a chance, I'll be open to do a lot of testing with it for you and tell you how it seems to work. I imagine the most useful implementation would be the clicked block face representing a Skript direction. That way you could so stuff like 5 meters (clicked block face) of clicked block. So if you clicked the "north" block face, it'd be 5 meters north.

@Snow-Pyon
Copy link

Snow-Pyon commented Mar 1, 2017

Just bumping this to see when this will be a thing, I know you don't have the time to do it and it might be a bigger task then what I thought, I'm bumping this just if you forgot about it and see if you think on add this on a non-far future.

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Mar 10, 2017

I will decompile Skript and add this type right now. Then do some testing to see how it goes.

Block Face would be nice. Skript tracks all block faces in the block state of blocks. But not for events like player interact.

Edit: I will try sometime. Skript and Git are being a bitch right now ;-;

@Syst3ms
Copy link
Contributor

Syst3ms commented Mar 10, 2017

You know, Github (and Github desktop) is a thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

No branches or pull requests

5 participants