Closed ryantheleach closed 8 years ago
That would be pretty cool. I don't know the complexity, but it would basically be reducing Player down to a "Controller" and then "putting" that controller on different entities/humanoids... say even different mob types? TileEntities?
I think it's possible, at least; maybe even with the current API, but I'm not sure.
Might have some incompatibilities with mods. But great idea overall - might be pretty cool for a disguise plugin!
Cutting out the connection code from EntityPlayerMP would be difficult and due to HOW it is all glued together, you would have to become the biggest liar of them all
...lying about who you are to the other clients that is.
One idea would be to synchronize your entity as a Creeper type to the other clients. The problems you'll encounter are assumptions the client makes (hitboxes/etc) but it is what it is. Another issue is some client code expects you to be an "EntityOtherPlayerMP" and if that isn't the case I'm fairly sure this will blow up in a hurry.
Of course, if you say "Well this will be running on the client" the things change but the code gets harder. Basically the job becomes fixing the above.
I'm fairly sure I could do it as a proof of concept but my TODO list is hilariously tall so I wouldn't be able to AT this time.
I wasn't even thinking necessarily other entity types, just other EntityPlayerMP. Thought that disguising as a Creeper could be done by vanishing the player, and having a creeper with custom AI, and transferring damage across.
@ryantheleach That would probably be a better idea. I could probably do a disguise API based on contextual data once that gets merged.
@ryantheleach I wanted to do point 3 for a long time. The issue is, that the client handles knockback and so wouldn't move at all and could even stop mid-air. If this becomes real, we have to be able to give a decoupled player entity AI.
Closing this as its more a thought experiment and not really practical for this API.
I have no idea how hard this would be, but one idea I've always wanted to see, was the ability to transplant connections to one player to another.
Possibilities I see this unlocking are:
Worth pursuing?