-127 ~ 128 to 0 ~ 255 entityTypeID (#8874)

This commit is contained in:
Siede
2023-07-31 19:48:41 +02:00
committed by GitHub
parent c406979291
commit e4bc6e21a4
2 changed files with 2 additions and 2 deletions

View File

@@ -414,7 +414,7 @@ public class NetClient implements ApplicationListener{
//entity must not be added yet, so create it
if(entity == null){
entity = (Syncc)EntityMapping.map(typeID).get();
entity = (Syncc)EntityMapping.map(typeID & 0xFF).get();
entity.id(id);
if(!netClient.isEntityUsed(entity.id())){
add = true;

View File

@@ -947,7 +947,7 @@ public class NetServer implements ApplicationListener{
//write all entities now
dataStream.writeInt(entity.id()); //write id
dataStream.writeByte(entity.classId()); //write type ID
dataStream.writeByte(entity.classId() & 0xFF); //write type ID
entity.writeSync(Writes.get(dataStream)); //write entity
sent++;