Make block follow players cursor when key is pressed

Started by BlaBlaSillySheep on

Topic category: Help with modding (Java Edition)

Last seen on 13:40, 13. Jun 2024
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make block follow players cursor when key is pressed

As the title says, how can i do this. I want to also make it so that it drops after a certain amount of time if wearing a piece of armor, otherwise not. And yes i dont think this is possible without coding but can someone help me with this.

Last seen on 16:48, 17. Jan 2024
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've no clue on how you can…
Sat, 07/18/2020 - 03:36

I've no clue on how you can do the first thing, however with the armor you could do an 'On player tick' procedure which checks the respective armor slots via If else statements, and if they all check out it sets a global variable to 1 more. Then you would need to multiply how long you want the armor to be worn(in seconds) by 20 to get how many ticks would be needed. Finally, you'd run an If statement on whatever drops the drop you mentioned to check if the global variable is greater than or equal to your desired time in ticks. Granted, this isn't super multiplayer-friendly from what I know, but it should get the job done.