SteamWar/BauSystem
Archiviert
13
0

Optimize EntityMetaDataPackets

Dieser Commit ist enthalten in:
jojo 2020-12-26 22:44:01 +01:00
Ursprung bdded55b86
Commit 445de39eb0
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -42,8 +42,10 @@ class TPSLimit_12 {
packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), 0, 0, 0)); packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), 0, 0, 0));
packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle())); packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle()));
net.minecraft.server.v1_12_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); if (entity instanceof TNTPrimed) {
packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); net.minecraft.server.v1_12_R1.Entity serverEntity = ((CraftEntity) entity).getHandle();
packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true));
}
}); });
} }

Datei anzeigen

@ -42,8 +42,10 @@ class TPSLimit_15 {
packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion)); packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion));
packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle())); packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle()));
net.minecraft.server.v1_15_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); if (entity instanceof TNTPrimed) {
packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); net.minecraft.server.v1_15_R1.Entity serverEntity = ((CraftEntity) entity).getHandle();
packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true));
}
}); });
} }