use of net.minecraft.network.play.server.SPacketTitle in project Railcraft by Railcraft.
the class TrackKitMessenger method sendMessage.
protected void sendMessage(EntityMinecart cart) {
cart.getRecursivePassengersByType(EntityPlayerMP.class).forEach(e -> {
try {
SPacketTitle pkt = new SPacketTitle(SPacketTitle.Type.SUBTITLE, TextComponentUtils.processComponent(cart, subtitle, e));
e.connection.sendPacket(pkt);
pkt = new SPacketTitle(SPacketTitle.Type.TITLE, TextComponentUtils.processComponent(cart, title, e));
e.connection.sendPacket(pkt);
} catch (CommandException ignored) {
}
});
}
Aggregations