Cuberite Forum
Monster in differen versions - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Monster in differen versions (/thread-3322.html)



Monster in differen versions - 12xx12 - 09-26-2020

So i did some poking in the monster code...

THERE IS A BIG PROBLEM WHEN SUPPORTING DIFFERENT VERSIONS WITH AGGRESIVE MONSTER!

Let's say there is a player connecting with 1.8 and goes into the end (high hypothetical) and the server generated a shulker enemy. And there he/she goes without any indication where the damage/effect came from...

The problem is that this player will be attacked from the entities propalby invisible. So we have to check for any entity and each possible interaction if the players client does support that interaction. (e.g. taking damage)

There are some entities wich do more or less the same. Like the 1.10 aditions to zombies and skeletons. So that could be covered by a workaround.

At the moment all entities implemented are supported in all versions. So this is safe.

What are your thoughts?


RE: Monster in differen versions - Mathias - 09-26-2020

Mob type mapping can be used for basic cases where the mobs are similar. This is already done for wither skeletons, which received their own entity ID in Minecraft 1.11.

- https://github.com/cuberite/cuberite/blob/f8de67aace4e65ff4c34a1f46f6d8b258b6839aa/src/Protocol/Protocol_1_8.cpp#L1910
- https://github.com/cuberite/cuberite/blob/f8de67aace4e65ff4c34a1f46f6d8b258b6839aa/src/Protocol/Protocol_1_11.cpp#L579


RE: Monster in differen versions - 12xx12 - 09-26-2020

Ok, so that‘s doable.

How about the other point when there‘s no other mob type to replace it with in the client?


RE: Monster in differen versions - tigerw - 09-27-2020

Pick the closest one :p
The server admin can of course decide to prevent old clients from joining too.


RE: Monster in differen versions - Krystilize - 09-27-2020

Wouldn't a solution using armor stands and falling block entities work? for example, using a white concrete falling sand entity to represent the shulker and having invisible armor stands with a certain block (maybe pink glass), on its head to represent the projectiles. Ofc, this would mean the armor stands need to be implemented.


RE: Monster in differen versions - tigerw - 09-27-2020

Might be a suitable task for a plugin once we get an API to access network packets directly


RE: Monster in differen versions - Krystilize - 09-28-2020

Well that would prevent other plugins from interacting with those entities unless they have an additional api call