forked from SteamWar/SteamWar
Classify packets by scope
This commit is contained in:
@@ -228,6 +228,7 @@ public class TechHider {
|
|||||||
ClientboundDisconnectPacket.class, // 7.1.33 Disconnect (play)
|
ClientboundDisconnectPacket.class, // 7.1.33 Disconnect (play)
|
||||||
ClientboundDisguisedChatPacket.class, // 7.1.34 Disguised Chat Message
|
ClientboundDisguisedChatPacket.class, // 7.1.34 Disguised Chat Message
|
||||||
ClientboundGameEventPacket.class, // 7.1.39 Game Event (like ElderGuardian effect, rain, thunder, etc.)
|
ClientboundGameEventPacket.class, // 7.1.39 Game Event (like ElderGuardian effect, rain, thunder, etc.)
|
||||||
|
ClientboundHorseScreenOpenPacket.class, // 7.1.41 Open Horse Screen: entity id based container.
|
||||||
ClientboundInitializeBorderPacket.class, // 7.1.43 Initialize World Border
|
ClientboundInitializeBorderPacket.class, // 7.1.43 Initialize World Border
|
||||||
ClientboundKeepAlivePacket.class, // 7.1.44 Clientbound Keep Alive (play)
|
ClientboundKeepAlivePacket.class, // 7.1.44 Clientbound Keep Alive (play)
|
||||||
ClientboundLoginPacket.class, // 7.1.49 Login (play)
|
ClientboundLoginPacket.class, // 7.1.49 Login (play)
|
||||||
@@ -285,7 +286,12 @@ public class TechHider {
|
|||||||
ClientboundCustomReportDetailsPacket.class, // 7.1.135 Custom Report Details
|
ClientboundCustomReportDetailsPacket.class, // 7.1.135 Custom Report Details
|
||||||
ClientboundServerLinksPacket.class, // 7.1.136 Server Links
|
ClientboundServerLinksPacket.class, // 7.1.136 Server Links
|
||||||
ClientboundClearDialogPacket.class, // 7.1.138 Clear Dialog (play)
|
ClientboundClearDialogPacket.class, // 7.1.138 Clear Dialog (play)
|
||||||
ClientboundShowDialogPacket.class // 7.1.139 Show Dialog (play)
|
ClientboundShowDialogPacket.class, // 7.1.139 Show Dialog (play)
|
||||||
|
|
||||||
|
// --- Play packets required manual review after update ---
|
||||||
|
// They include world data but non that can reveal critical information
|
||||||
|
ClientboundBlockChangedAckPacket.class, // 7.1.5 Acknowledge Block Change
|
||||||
|
ClientboundChunksBiomesPacket.class // 7.1.14 Chunk Biomes
|
||||||
));
|
));
|
||||||
|
|
||||||
BiFunction<Player, Packet<? extends PacketListener>, Packet<? extends PacketListener>> tossPacket = (p, packet) -> null;
|
BiFunction<Player, Packet<? extends PacketListener>, Packet<? extends PacketListener>> tossPacket = (p, packet) -> null;
|
||||||
@@ -294,77 +300,30 @@ public class TechHider {
|
|||||||
// 7.1.x Bundle Packet: packet container; blocked until nested packets are safely unbundled/processed.
|
// 7.1.x Bundle Packet: packet container; blocked until nested packets are safely unbundled/processed.
|
||||||
processors.put(ClientboundBundlePacket.class, tossPacket);
|
processors.put(ClientboundBundlePacket.class, tossPacket);
|
||||||
|
|
||||||
|
// --- Entity packets ---
|
||||||
// 7.1.2 Spawn Entity: entity type and position can reveal hidden contraptions.
|
// 7.1.2 Spawn Entity: entity type and position can reveal hidden contraptions.
|
||||||
processors.put(ClientboundAddEntityPacket.class, tossPacket);
|
processors.put(ClientboundAddEntityPacket.class, tossPacket);
|
||||||
// 7.1.3 Entity Animation: entity id based signal, keep blocked until entity visibility is modeled.
|
// 7.1.3 Entity Animation: entity id based signal, keep blocked until entity visibility is modeled.
|
||||||
processors.put(ClientboundAnimatePacket.class, tossPacket);
|
processors.put(ClientboundAnimatePacket.class, tossPacket);
|
||||||
// 7.1.5 Acknowledge Block Change: block interaction side channel; blocked pending review.
|
|
||||||
processors.put(ClientboundBlockChangedAckPacket.class, tossPacket);
|
|
||||||
// 7.1.6 Set Block Destroy Stage: block position and mining progress can reveal activity.
|
|
||||||
processors.put(ClientboundBlockDestructionPacket.class, tossPacket);
|
|
||||||
// 7.1.7 Block Entity Data: currently filtered by block position and allowed tile-entity actions.
|
|
||||||
processors.put(ClientboundBlockEntityDataPacket.class, (p, packet) -> processBlockEntityDataPacket(p, (ClientboundBlockEntityDataPacket) packet));
|
|
||||||
// 7.1.8 Block Action: currently filtered by block position.
|
|
||||||
processors.put(ClientboundBlockEventPacket.class, (p, packet) -> processBlockEventPacket(p, (ClientboundBlockEventPacket) packet));
|
|
||||||
// 7.1.9 Block Update: currently filtered/obfuscated by block position and block id.
|
|
||||||
processors.put(ClientboundBlockUpdatePacket.class, (p, packet) -> processBlockUpdatePacket(p, (ClientboundBlockUpdatePacket) packet));
|
|
||||||
// 7.1.14 Chunk Biomes: chunk/world data side channel.
|
|
||||||
processors.put(ClientboundChunksBiomesPacket.class, tossPacket);
|
|
||||||
// 7.1.26 Damage Event: entity ids and damage source location can leak hidden activity.
|
// 7.1.26 Damage Event: entity ids and damage source location can leak hidden activity.
|
||||||
processors.put(ClientboundDamageEventPacket.class, tossPacket);
|
processors.put(ClientboundDamageEventPacket.class, tossPacket);
|
||||||
// 7.1.31 Debug Sample: debug telemetry; blocked by default.
|
|
||||||
processors.put(ClientboundDebugSamplePacket.class, tossPacket);
|
|
||||||
// 7.1.35 Entity Event: entity id based signal.
|
// 7.1.35 Entity Event: entity id based signal.
|
||||||
processors.put(ClientboundEntityEventPacket.class, tossPacket);
|
processors.put(ClientboundEntityEventPacket.class, tossPacket);
|
||||||
// 7.1.36 Teleport Entity: entity id and absolute position.
|
// 7.1.36 Teleport Entity: entity id and absolute position.
|
||||||
processors.put(ClientboundTeleportEntityPacket.class, tossPacket);
|
processors.put(ClientboundTeleportEntityPacket.class, tossPacket);
|
||||||
// 7.1.37 Explosion: position, affected blocks, and knockback can reveal TNT/tech.
|
|
||||||
processors.put(ClientboundExplodePacket.class, tossPacket);
|
|
||||||
// 7.1.38 Unload Chunk: chunk visibility side channel.
|
|
||||||
processors.put(ClientboundForgetLevelChunkPacket.class, tossPacket);
|
|
||||||
// 7.1.41 Open Horse Screen: entity id based container.
|
|
||||||
processors.put(ClientboundHorseScreenOpenPacket.class, tossPacket);
|
|
||||||
// 7.1.42 Hurt Animation: entity id based signal.
|
// 7.1.42 Hurt Animation: entity id based signal.
|
||||||
processors.put(ClientboundHurtAnimationPacket.class, tossPacket);
|
processors.put(ClientboundHurtAnimationPacket.class, tossPacket);
|
||||||
// 7.1.45 Chunk Data and Update Light: currently filtered/obfuscated by chunk data processor.
|
|
||||||
processors.put(ClientboundLevelChunkWithLightPacket.class, (p, packet) -> processChunkWithLight(p, (ClientboundLevelChunkWithLightPacket) packet));
|
|
||||||
// 7.1.46 World Event: block position/event id can leak activity.
|
|
||||||
processors.put(ClientboundLevelEventPacket.class, tossPacket);
|
|
||||||
// 7.1.47 Particle: particle type and position can reveal hidden machinery.
|
|
||||||
processors.put(ClientboundLevelParticlesPacket.class, tossPacket);
|
|
||||||
// 7.1.48 Update Light: lighting can reveal hidden blocks/operations.
|
|
||||||
processors.put(ClientboundLightUpdatePacket.class, tossPacket);
|
|
||||||
// 7.1.50 Map Data: map pixels/icons can reveal player/world state.
|
|
||||||
processors.put(ClientboundMapItemDataPacket.class, tossPacket);
|
|
||||||
// 7.1.52/53/55 Update Entity Position/Rotation: entity id and movement signal.
|
// 7.1.52/53/55 Update Entity Position/Rotation: entity id and movement signal.
|
||||||
processors.put(ClientboundMoveEntityPacket.class, tossPacket);
|
processors.put(ClientboundMoveEntityPacket.class, tossPacket);
|
||||||
processors.put(Pos.class, tossPacket);
|
processors.put(Pos.class, tossPacket);
|
||||||
processors.put(PosRot.class, tossPacket);
|
processors.put(PosRot.class, tossPacket);
|
||||||
processors.put(Rot.class, tossPacket);
|
processors.put(Rot.class, tossPacket);
|
||||||
// 7.1.54 Move Minecart Along Track: entity path and position signal.
|
|
||||||
processors.put(ClientboundMoveMinecartPacket.class, tossPacket);
|
|
||||||
// 7.1.56 Move Vehicle (clientbound): vehicle position signal.
|
|
||||||
processors.put(ClientboundMoveVehiclePacket.class, tossPacket);
|
|
||||||
// 7.1.59 Open Sign Editor: block position.
|
|
||||||
processors.put(ClientboundOpenSignEditorPacket.class, tossPacket);
|
|
||||||
// 7.1.67 Combat Death: entity/player ids and death message context.
|
|
||||||
processors.put(ClientboundPlayerCombatKillPacket.class, tossPacket);
|
|
||||||
// 7.1.68 Player Info Remove: other-player identity/state.
|
|
||||||
processors.put(ClientboundPlayerInfoRemovePacket.class, tossPacket);
|
|
||||||
// 7.1.69 Player Info Update: other-player identity/state.
|
|
||||||
processors.put(ClientboundPlayerInfoUpdatePacket.class, tossPacket);
|
|
||||||
// 7.1.70 Look At: target position/entity.
|
|
||||||
processors.put(ClientboundPlayerLookAtPacket.class, tossPacket);
|
|
||||||
// 7.1.76 Remove Entities: entity id visibility side channel.
|
// 7.1.76 Remove Entities: entity id visibility side channel.
|
||||||
processors.put(ClientboundRemoveEntitiesPacket.class, tossPacket);
|
processors.put(ClientboundRemoveEntitiesPacket.class, tossPacket);
|
||||||
// 7.1.77 Remove Entity Effect: entity id and effect state.
|
// 7.1.77 Remove Entity Effect: entity id and effect state.
|
||||||
processors.put(ClientboundRemoveMobEffectPacket.class, tossPacket);
|
processors.put(ClientboundRemoveMobEffectPacket.class, tossPacket);
|
||||||
// 7.1.82 Set Head Rotation: entity id and rotation.
|
// 7.1.82 Set Head Rotation: entity id and rotation.
|
||||||
processors.put(ClientboundRotateHeadPacket.class, tossPacket);
|
processors.put(ClientboundRotateHeadPacket.class, tossPacket);
|
||||||
// 7.1.83 Update Section Blocks: currently filtered/obfuscated by section block processor.
|
|
||||||
processors.put(ClientboundSectionBlocksUpdatePacket.class, (p, packet) -> processSectionUpdate(p, (ClientboundSectionBlocksUpdatePacket) packet));
|
|
||||||
// 7.1.92 Set Camera: entity id.
|
|
||||||
processors.put(ClientboundSetCameraPacket.class, tossPacket);
|
|
||||||
// 7.1.98 Set Entity Metadata: entity state can reveal blocks/items/displays.
|
// 7.1.98 Set Entity Metadata: entity state can reveal blocks/items/displays.
|
||||||
processors.put(ClientboundSetEntityDataPacket.class, tossPacket);
|
processors.put(ClientboundSetEntityDataPacket.class, tossPacket);
|
||||||
// 7.1.99 Link Entities: entity relationship signal.
|
// 7.1.99 Link Entities: entity relationship signal.
|
||||||
@@ -375,24 +334,90 @@ public class TechHider {
|
|||||||
processors.put(ClientboundSetEquipmentPacket.class, tossPacket);
|
processors.put(ClientboundSetEquipmentPacket.class, tossPacket);
|
||||||
// 7.1.106 Set Passengers: entity relationship signal.
|
// 7.1.106 Set Passengers: entity relationship signal.
|
||||||
processors.put(ClientboundSetPassengersPacket.class, tossPacket);
|
processors.put(ClientboundSetPassengersPacket.class, tossPacket);
|
||||||
// 7.1.108 Update Teams: player/team membership can be used as intel.
|
// 7.1.130 Update Attributes: entity id and attribute state.
|
||||||
processors.put(ClientboundSetPlayerTeamPacket.class, tossPacket);
|
processors.put(ClientboundUpdateAttributesPacket.class, tossPacket);
|
||||||
|
// 7.1.131 Entity Effect: entity id and effect state.
|
||||||
|
processors.put(ClientboundUpdateMobEffectPacket.class, tossPacket);
|
||||||
|
|
||||||
|
|
||||||
|
// --- Block entity packets ---
|
||||||
|
// 7.1.7 Block Entity Data: currently filtered by block position and allowed tile-entity actions.
|
||||||
|
processors.put(ClientboundBlockEntityDataPacket.class, (p, packet) -> processBlockEntityDataPacket(p, (ClientboundBlockEntityDataPacket) packet));
|
||||||
|
// 7.1.122 Tag Query Response: block-entity query result.
|
||||||
|
processors.put(ClientboundTagQueryPacket.class, tossPacket);
|
||||||
|
|
||||||
|
|
||||||
|
// --- Block packets ---
|
||||||
|
// 7.1.6 Set Block Destroy Stage: block position and mining progress can reveal activity.
|
||||||
|
processors.put(ClientboundBlockDestructionPacket.class, tossPacket);
|
||||||
|
// 7.1.8 Block Action: currently filtered by block position.
|
||||||
|
processors.put(ClientboundBlockEventPacket.class, (p, packet) -> processBlockEventPacket(p, (ClientboundBlockEventPacket) packet));
|
||||||
|
// 7.1.9 Block Update: currently filtered/obfuscated by block position and block id.
|
||||||
|
processors.put(ClientboundBlockUpdatePacket.class, (p, packet) -> processBlockUpdatePacket(p, (ClientboundBlockUpdatePacket) packet));
|
||||||
|
|
||||||
|
// --- Chunk packets ---
|
||||||
|
// 7.1.38 Unload Chunk: chunk visibility side channel.
|
||||||
|
processors.put(ClientboundForgetLevelChunkPacket.class, tossPacket);
|
||||||
|
// 7.1.45 Chunk Data and Update Light: currently filtered/obfuscated by chunk data processor.
|
||||||
|
processors.put(ClientboundLevelChunkWithLightPacket.class, (p, packet) -> processChunkWithLight(p, (ClientboundLevelChunkWithLightPacket) packet));
|
||||||
|
|
||||||
|
// --- Section packets ---
|
||||||
|
// 7.1.83 Update Section Blocks: currently filtered/obfuscated by section block processor.
|
||||||
|
processors.put(ClientboundSectionBlocksUpdatePacket.class, (p, packet) -> processSectionUpdate(p, (ClientboundSectionBlocksUpdatePacket) packet));
|
||||||
|
|
||||||
|
|
||||||
|
// --- Particle packets ---
|
||||||
|
// 7.1.47 Particle: particle type and position can reveal hidden machinery.
|
||||||
|
processors.put(ClientboundLevelParticlesPacket.class, tossPacket);
|
||||||
|
|
||||||
|
// --- Sound packets ---
|
||||||
// 7.1.115 Entity Sound Effect: entity id and sound.
|
// 7.1.115 Entity Sound Effect: entity id and sound.
|
||||||
processors.put(ClientboundSoundEntityPacket.class, tossPacket);
|
processors.put(ClientboundSoundEntityPacket.class, tossPacket);
|
||||||
// 7.1.116 Sound Effect: sound type and position.
|
// 7.1.116 Sound Effect: sound type and position.
|
||||||
processors.put(ClientboundSoundPacket.class, tossPacket);
|
processors.put(ClientboundSoundPacket.class, tossPacket);
|
||||||
// 7.1.118 Stop Sound: sound state side channel.
|
// 7.1.118 Stop Sound: sound state side channel.
|
||||||
processors.put(ClientboundStopSoundPacket.class, tossPacket);
|
processors.put(ClientboundStopSoundPacket.class, tossPacket);
|
||||||
// 7.1.122 Tag Query Response: block-entity query result.
|
|
||||||
processors.put(ClientboundTagQueryPacket.class, tossPacket);
|
|
||||||
|
// --- Lighting packets ---
|
||||||
|
// 7.1.48 Update Light: lighting can reveal hidden blocks/operations.
|
||||||
|
processors.put(ClientboundLightUpdatePacket.class, tossPacket);
|
||||||
|
|
||||||
|
// --- Player packets ---
|
||||||
|
// 7.1.67 Combat Death: entity/player ids and death message context.
|
||||||
|
processors.put(ClientboundPlayerCombatKillPacket.class, tossPacket);
|
||||||
|
// 7.1.68 Player Info Remove: other-player identity/state.
|
||||||
|
processors.put(ClientboundPlayerInfoRemovePacket.class, tossPacket);
|
||||||
|
// 7.1.69 Player Info Update: other-player identity/state.
|
||||||
|
processors.put(ClientboundPlayerInfoUpdatePacket.class, tossPacket);
|
||||||
|
// 7.1.70 Look At: target position/entity.
|
||||||
|
processors.put(ClientboundPlayerLookAtPacket.class, tossPacket);
|
||||||
|
|
||||||
|
|
||||||
|
// --- Others ---
|
||||||
|
|
||||||
|
// 7.1.37 Explosion: position, affected blocks, and knockback can reveal TNT/tech.
|
||||||
|
processors.put(ClientboundExplodePacket.class, tossPacket);
|
||||||
|
// 7.1.46 World Event: block position/event id can leak activity.
|
||||||
|
processors.put(ClientboundLevelEventPacket.class, tossPacket);
|
||||||
|
// 7.1.50 Map Data: map pixels/icons can reveal player/world state.
|
||||||
|
processors.put(ClientboundMapItemDataPacket.class, tossPacket);
|
||||||
|
// 7.1.54 Move Minecart Along Track: entity path and position signal.
|
||||||
|
processors.put(ClientboundMoveMinecartPacket.class, tossPacket);
|
||||||
|
// 7.1.56 Move Vehicle (clientbound): vehicle position signal.
|
||||||
|
processors.put(ClientboundMoveVehiclePacket.class, tossPacket);
|
||||||
|
// 7.1.59 Open Sign Editor: block position.
|
||||||
|
processors.put(ClientboundOpenSignEditorPacket.class, tossPacket);
|
||||||
|
|
||||||
|
// 7.1.92 Set Camera: entity id.
|
||||||
|
processors.put(ClientboundSetCameraPacket.class, tossPacket);
|
||||||
|
// 7.1.108 Update Teams: player/team membership can be used as intel.
|
||||||
|
processors.put(ClientboundSetPlayerTeamPacket.class, tossPacket);
|
||||||
|
|
||||||
// 7.1.123 Pickup Item: item/entity ids and pickup activity.
|
// 7.1.123 Pickup Item: item/entity ids and pickup activity.
|
||||||
processors.put(ClientboundTakeItemEntityPacket.class, tossPacket);
|
processors.put(ClientboundTakeItemEntityPacket.class, tossPacket);
|
||||||
// 7.1.124 Synchronize Vehicle Position: entity/vehicle position.
|
// 7.1.124 Synchronize Vehicle Position: entity/vehicle position.
|
||||||
processors.put(ClientboundEntityPositionSyncPacket.class, tossPacket);
|
processors.put(ClientboundEntityPositionSyncPacket.class, tossPacket);
|
||||||
// 7.1.130 Update Attributes: entity id and attribute state.
|
|
||||||
processors.put(ClientboundUpdateAttributesPacket.class, tossPacket);
|
|
||||||
// 7.1.131 Entity Effect: entity id and effect state.
|
|
||||||
processors.put(ClientboundUpdateMobEffectPacket.class, tossPacket);
|
|
||||||
// 7.1.133 Update Tags (play): registry/tag data can be added back after review.
|
// 7.1.133 Update Tags (play): registry/tag data can be added back after review.
|
||||||
processors.put(ClientboundUpdateTagsPacket.class, tossPacket);
|
processors.put(ClientboundUpdateTagsPacket.class, tossPacket);
|
||||||
// 7.1.134 Projectile Power: projectile/entity signal.
|
// 7.1.134 Projectile Power: projectile/entity signal.
|
||||||
@@ -526,4 +551,6 @@ public class TechHider {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user