#Help with creating a custom Entity in Minecraft Fabric

1 messages · Page 1 of 1 (latest)

urban spire
west pivotBOT
#

<@&987246652869971988> please have a look, thanks.

west pivotBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

west pivotBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍

urban spire
#

https://gist.github.com/TechPro424/831df73990d36c01038d07b258697f4d
I'm trying to track my custom entity's origin point using DataTracker
my custom entity spawns when I punch a tree
However, when I punch the tree and cause it to spawn, the game crashes with an error which I have provided in the Gist
The relevant code is also in the Gist

Please help me out and ping me when replying

Gist

GitHub Gist: instantly share code, notes, and snippets.

urban spire
median rune
#

try adding a breakpoint at the error to see what entry is supposed to be?

#

idk

urban spire
#

I had to move this.dataTracker.startTracking(ORIGIN, BlockPos.ORIGIN); from the entityInit method to the initDataTracker method and initialize ORIGIN during declaration instead of in the initDataTracker method

#

That solved it