target creature location crashing even though it worked before????

Started by scrumbert on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
target creature location crashing even though it worked before????

so i have this entity (night flayer) that is supposed to do an air dash attack towards the player by pushing it with the value of the players location minus the entities own location, but it seems to have trouble locating the entity it is targetting for attack even though it is checking if its aggressive and using variables?

it keeps giving me this error and crashing, but when i log back in, it still does the dash in the correct direction?

i was able to use the locating of target entities in other procedures, but this one doesnt work???????

hlep me.....


Description: Ticking entity

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.getX()"
    at net.thedead.procedures.FlayerfiendLEAPCOUNTProcedure.execute(FlayerfiendLEAPCOUNTProcedure.java:24) ~[main/:?] {re:classloading}
    at net.thedead.entity.FlayerfiendEntity.baseTick(FlayerfiendEntity.java:173) ~[main/:?] {re:classloading}
    at net.minecraft.world.entity.Entity.tick(Entity.java:422) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B}
 

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you show your procedure?
Sun, 10/19/2025 - 18:14

can you show your procedure?

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the procedure itself is…
Sun, 10/19/2025 - 18:19

the procedure itself is really long because of how many steps there are so heres the offending blocks

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
have you tried printing the…
Sun, 10/19/2025 - 18:26

have you tried printing the Get entity entity is targeting for attack?

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it doesnt print anything????…
Sun, 10/19/2025 - 19:29

it doesnt print anything??????

da fuq,

all the things that check if its aggressive are ticking as true, but it isnt sonofason