Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Remove unused 1.18 code
Dieser Commit ist enthalten in:
Ursprung
dfc77b6f84
Commit
2b77427d0b
@ -98,7 +98,7 @@ public final class Protocol1_18To1_17_1 extends AbstractProtocol<ClientboundPack
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(final UserConnection connection) {
|
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());
|
connection.put(new ChunkLightStorage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,15 +34,10 @@ public final class EntityPackets extends EntityRewriter<Protocol1_18To1_17_1> {
|
|||||||
|
|
||||||
public EntityPackets(final Protocol1_18To1_17_1 protocol) {
|
public EntityPackets(final Protocol1_18To1_17_1 protocol) {
|
||||||
super(protocol);
|
super(protocol);
|
||||||
//mapTypes(Entity1_17Types.values(), Entity1_18Types.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerPackets() {
|
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);
|
registerMetadataRewriter(ClientboundPackets1_17_1.ENTITY_METADATA, Types1_17.METADATA_LIST, Types1_18.METADATA_LIST);
|
||||||
|
|
||||||
protocol.registerClientbound(ClientboundPackets1_17_1.JOIN_GAME, new PacketRemapper() {
|
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);
|
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
|
@Override
|
||||||
public EntityType typeFromId(final int type) {
|
public EntityType typeFromId(final int type) {
|
||||||
//TODO Entity1_18Types
|
|
||||||
return Entity1_17Types.getTypeFromId(type);
|
return Entity1_17Types.getTypeFromId(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,12 +142,6 @@ public final class WorldPackets {
|
|||||||
final DataPaletteImpl blockPalette = new DataPaletteImpl(ChunkSection.SIZE);
|
final DataPaletteImpl blockPalette = new DataPaletteImpl(ChunkSection.SIZE);
|
||||||
blockPalette.addId(0);
|
blockPalette.addId(0);
|
||||||
section.addPalette(PaletteType.BLOCKS, blockPalette);
|
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
|
// Fill biome palette
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren