lapse blue

Started by Gabry_2317 on

Topic category: Help with modding (Java Edition)

Last seen on 13:54, 25. Feb 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lapse blue

hi, I'm creating a jujutsu kaisen mod and I needed a hand in creating a procedure, specifically that of the blue lapse, this should attract all the blocks and hostile entities to it by creating a sort of black hole, do you have any ideas on how to do it?

Last seen on 23:34, 25. Feb 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The specifics are kind of up…
Thu, 01/25/2024 - 12:55

The specifics are kind of up to you, but I can offer some general advice:

  • You'll want to create some sort of 'black hole' entity, a static entity without AI, possibly with a transparent model so as to appear invisible, depending on how you want it to look. 
  • This entity should have an update tick procedure that uses an 'entity iterator' bracket to target all entities within a given radius. (You can then make functions that target the entity iterator instead of the target entity- essentially, a function that will be run once for every entity in the radius.) 
  • You then need to make the entity iterator move towards the x/y/z position of the target entity. This will require the 'attempt to override motion delta' function, along with some basic trig. This is kind of hard to summarize, but here's an example of how I made something that launches entities backwards. (In your case you would want them to move towards the center, not away from it, so you would want to multiply everything by -1. You would also need to take the y vector into account.)
  • Blocks are much, much harder. You can technically convert any block to a falling-block entity, which would allow them to be moved, but this would be difficult, probably pretty performance intensive, and generally complicated. Not impossible, but not sure how I'd do it.
Last seen on 13:54, 25. Feb 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks Mindthekids if it's…
Tue, 01/30/2024 - 13:54

thanks Mindthekids if it's not a problem could you attach the procedure file so that I can directly make the changes thanks