#3810: Use retainedSlice if possible in MinecraftDecoder
This commit is contained in:
@@ -82,21 +82,9 @@ public abstract class EntityMap
|
||||
case ProtocolConstants.MINECRAFT_1_19_4:
|
||||
case ProtocolConstants.MINECRAFT_1_20:
|
||||
return EntityMap_1_16_2.INSTANCE_1_19_4;
|
||||
case ProtocolConstants.MINECRAFT_1_20_2:
|
||||
return EntityMap_1_16_2.INSTANCE_1_20_2;
|
||||
case ProtocolConstants.MINECRAFT_1_20_3:
|
||||
return EntityMap_1_16_2.INSTANCE_1_20_3;
|
||||
case ProtocolConstants.MINECRAFT_1_20_5:
|
||||
case ProtocolConstants.MINECRAFT_1_21:
|
||||
return EntityMap_1_16_2.INSTANCE_1_20_5;
|
||||
case ProtocolConstants.MINECRAFT_1_21_2:
|
||||
return EntityMap_1_16_2.INSTANCE_1_21_2;
|
||||
case ProtocolConstants.MINECRAFT_1_21_4:
|
||||
return EntityMap_1_16_2.INSTANCE_1_21_4;
|
||||
case ProtocolConstants.MINECRAFT_1_21_5:
|
||||
return EntityMap_1_16_2.INSTANCE_1_21_5;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||
}
|
||||
|
||||
protected void addRewrite(int id, ProtocolConstants.Direction direction, boolean varint)
|
||||
|
@@ -20,12 +20,6 @@ class EntityMap_1_16_2 extends EntityMap
|
||||
static final EntityMap_1_16_2 INSTANCE_1_19 = new EntityMap_1_16_2( 0x02, 0x2F );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_19_1 = new EntityMap_1_16_2( 0x02, 0x30 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_19_4 = new EntityMap_1_16_2( 0x03, 0x30 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_20_2 = new EntityMap_1_16_2( -1, 0x33 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_20_3 = new EntityMap_1_16_2( -1, 0x34 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_20_5 = new EntityMap_1_16_2( -1, 0x37 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_21_2 = new EntityMap_1_16_2( -1, 0x39 );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_21_4 = new EntityMap_1_16_2( -1, 0x3B );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_21_5 = new EntityMap_1_16_2( -1, 0x3C );
|
||||
//
|
||||
private final int spawnPlayerId;
|
||||
private final int spectateId;
|
||||
|
Reference in New Issue
Block a user