Started by
Granknight
on
Topic category: Feature requests and ideas for MCreator
I was wondering if it was possible for a procedure block to be added that forces a player action, something that uses mouse and or keyboard key-binds, something like if the player is holding [curse of binding pumpkin] the user right clicks it / if player is looking at a villager and and iron golem is within 20 blocks make player punch / forcing the player to jump if they touch a specific block / clicking the [F] key causes the player to punch. The examples I gave could be made without the need for this feature but it makes it more fitting with a feature like this to exist for them. I am aware that there is something like that already in Mcreator but it only works for blocks.
Edited by Granknight on Wed, 06/04/2025 - 00:54
ok this might work. but its gonna be pretty complicated in my opinion.
1st create a Local variable and name it "yaw"
2nd the block [does entity exist at xyz in square cube with size 4 of type "no entry selected"]
in X: cos[[[get local: yaw + 90] * [pi / 180]]
in y: [[head pitch of event/target entity in degrees] * [ -0.005]]
in z: sin[[[get local: yaw + 90] * [pi / 180]]
this should search if theres an entity of your choice right where your looking, i hope lol
aww i forgot, right after you create the variable "yaw" you have to Set local: yaw to: direction (yaw) in de.g relative to S of Event/target entity
Download an plugin called snail if your using older versions it should have smth that forces the player to do an action