3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Remove unused 1.18 code

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-11-13 11:10:05 +01:00
Ursprung dfc77b6f84
Commit 2b77427d0b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
3 geänderte Dateien mit 1 neuen und 19 gelöschten Zeilen

Datei anzeigen

@ -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());
}

Datei anzeigen

@ -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);
}
}

Datei anzeigen

@ -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