Making a vacuum, can't figure this out.

Started by 8BitBunnie on Wed, 11/16/2022 - 02:55

Topic category: Help with modding (Java Edition)

Last seen on 10:14, 30. Dec 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Making a vacuum, can't figure this out.
Wed, 11/16/2022 - 02:55

I'm making a vacuum entity that is supposed to suck up item that it runs into, my code is in the OnEntityTickUpdate and looks like this, but crashes my game the second the vacuum touches an item. any ideas?

Last seen on 22:45, 7. Feb 2023
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The get nearest entity cube…
Wed, 11/16/2022 - 09:23

The get nearest entity cube size is bigger than the does entity exist cube size.

Last seen on 10:14, 30. Dec 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I know, that's intentional…
Thu, 11/17/2022 - 04:56

I know, that's intentional. I've already tried it with them being the same

 

Last seen on 21:48, 8. Feb 2023
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It could be crashing because…
Sun, 12/18/2022 - 20:20

It could be crashing because your code might be trying to despawn a null entity, you might want to check if "get nearest entity in square cube of type item" is not equal to "null" and then run the code

Otherwise post crash log in the build console, that might pinpoint us to the issue at hand :)