Making a vacuum, can't figure this out.

Started by 8BitBunnie on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a vacuum, can't figure this out.

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?

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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

 

Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 :)