Listener.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:OreLogger 作者:
@SubscribeEvent
public void onConnect(ClientConnectedToServerEvent event) {
    VersionChecker.checkVersion();
    // forges api doesnt offer a listener for block breaks client side only, so we resort to dirty hacks. To understand
    // how this works,
    // you need a basic understanding of netty

    // We insert our own outbound manager inbetween forge's packet handler and minecrafts packet handler. At this point
    // decryption, decompression and deserialization are done and the data being passed is an event with which we can
    // work
    event.getManager().channel().pipeline()
            .addAfter("fml:packet_handler", "processBreaks", new BlockBreakHandler(sbCounter));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号