Remove unused 1.18 code

This commit is contained in:
Nassim Jahnke 2021-11-13 11:10:05 +01:00
parent dfc77b6f84
commit 2b77427d0b
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
3 changed files with 1 additions and 19 deletions

View File

@ -98,7 +98,7 @@ public final class Protocol1_18To1_17_1 extends AbstractProtocol<ClientboundPack
@Override
public void init(final UserConnection connection) {
addEntityTracker(connection, new EntityTrackerBase(connection, Entity1_17Types.PLAYER)); //TODO Entity1_18Types
addEntityTracker(connection, new EntityTrackerBase(connection, Entity1_17Types.PLAYER));
connection.put(new ChunkLightStorage());
}

View File

@ -34,15 +34,10 @@ public final class EntityPackets extends EntityRewriter<Protocol1_18To1_17_1> {
public EntityPackets(final Protocol1_18To1_17_1 protocol) {
super(protocol);
//mapTypes(Entity1_17Types.values(), Entity1_18Types.class);
}
@Override
public void registerPackets() {
/*registerTrackerWithData(ClientboundPackets1_17_1.SPAWN_ENTITY, Entity1_18Types.FALLING_BLOCK);
registerTracker(ClientboundPackets1_17_1.SPAWN_MOB);
registerTracker(ClientboundPackets1_17_1.SPAWN_PLAYER, Entity1_18Types.PLAYER);
registerRemoveEntities(ClientboundPackets1_17_1.REMOVE_ENTITIES);*/
registerMetadataRewriter(ClientboundPackets1_17_1.ENTITY_METADATA, Types1_17.METADATA_LIST, Types1_18.METADATA_LIST);
protocol.registerClientbound(ClientboundPackets1_17_1.JOIN_GAME, new PacketRemapper() {
@ -102,17 +97,10 @@ public final class EntityPackets extends EntityRewriter<Protocol1_18To1_17_1> {
});
registerMetaTypeHandler(Types1_18.META_TYPES.itemType, null, null);
/*filter().filterFamily(Entity1_17Types.MINECART_ABSTRACT).index(11).handler((event, meta) -> { //TODO check id
// Convert to new block id
int data = (int) meta.getValue();
meta.setValue(protocol.getMappingData().getNewBlockStateId(data));
});*/
}
@Override
public EntityType typeFromId(final int type) {
//TODO Entity1_18Types
return Entity1_17Types.getTypeFromId(type);
}
}

View File

@ -142,12 +142,6 @@ public final class WorldPackets {
final DataPaletteImpl blockPalette = new DataPaletteImpl(ChunkSection.SIZE);
blockPalette.addId(0);
section.addPalette(PaletteType.BLOCKS, blockPalette);
} else {
/*final DataPalette blockpalette = section.palette(PaletteType.BLOCKS);
for (int j = 0; j < blockpalette.size(); j++) {
final int old = blockpalette.entry(j);
blockpalette.setEntry(j, protocol.getMappingData().getNewBlockStateId(old));
}*/
}
// Fill biome palette