Jump to content

Client side only entities.


leftler

Recommended Posts

With the client/server split I am having a little trouble knowing where to put my code. I am building a mod that lets players see their creations from schematic files in-game and can help them place the blocks in the correct locations to build large complicated projects when access to the raw map files are not available (like in a multiplayer environment). I have figured out that I am going to represent these planning blocks as entities (I call them "EntityGhostBlocks" due to their opacity not being set to 100%). This lets me not worry abut block replacement code and I keep the in-memory chunk block list pristine and in sync with the server. When a real block gets placed on the entity I remove it.

 

The issue is I wanted to set this up so a player could use this on a multiplayer server without any server side mods installed. My question is how do I get these entities to show up and be able to manipulate them on the client but not have them sent to the server?

Link to comment
Share on other sites

i have a theory of how you might be able to , it would be extremely hacky though as you would need to force the client side chunks to display your ghost blocks. the problem is it would have to some how change the communication between the client and server some how forcing the display. i think their is a cache of the chunks that are loaded , so you'd have to edit that on the fly before the render pass i think.

 

all just theory but the mod sounds great, hope you can get it working , and if not let me know i'll try to after i finish my current mod project

Link to comment
Share on other sites

The problem is that most of the block hooks (like onBlockActivated) aren't called on the client any more. You just don't get the feedback there. So unfortunately, I think that is not possible.

 

Of course they get called in client world.

 

@OP

Do not register your entities and just spawn them in your clientworld, and no one would see them except of you.

 

Link to comment
Share on other sites

Im also confused since 1.3

 

im having 2 entitys:

1 is a human one and its working fine.

The other one is a animal and that one isnt working anymore. Its now invisible for some reason (it was working fine with 1.2.5)

 

my Model, Render and Entinity files are in the common folder.

 

 

I also tried to implement IAnimal to the entityanimal. its getting visible then but its rendering as a human model O.o

 

 

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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