Jump to content

Entity Syncronisation


Recommended Posts

So, I am fairly sure that you only need to create/spawn entities server-side (to avoid having client-side "ghost" entities), but I don't know how to then make the client aware of the entities that are spawned server-side.


(Note that I am not referring to mobs, just entities that inherit from the base entity class)


Thanks in advance for any help!

Link to comment
Share on other sites

At the moment, the entity only exists server-side.


Is it that I am entering it into the world wrong? At the moment what I am doing is this:


Which only occurs server-side, and the entity is definitely ticking server-side so it definitely gets this far at the least.

Link to comment
Share on other sites

Yes I have registered the entity in the init phase (do I need to do it in a specific phase?)

EntityRegistry.registerGlobalEntityID(EntityQuantumEssentia.class, "qfthaum_essentia", EntityRegistry.findGlobalUniqueEntityId());

Link to comment
Share on other sites

Ok, changing that has worked, thanks a bunch!

for the sake of anyone wondering about my final solution:

EntityRegistry.registerModEntity(EntityQuantumEssentia.class, "qfthaum_essentia", 0, this, 64, 1, true);

Link to comment
Share on other sites

I've now hit a related issue.


Put simply, I don't know how to synchronize variables inside the entity, (which usually would not be an issue unless they are used for rendering, which this is).


In this particular case the variable is set when the entity is created and will never be changed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.