Topic category: Help with Minecraft modding (Java Edition)
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}
can you show your procedure?
the procedure itself is really long because of how many steps there are so heres the offending blocks
have you tried printing the
Get entity entity is targeting for attack
?it doesnt print anything??????
da fuq,
all the things that check if its aggressive are ticking as true, but it isnt sonofason