ClientHandler.java 文件源码

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

项目:Real-Life-Mod-1.8 作者:
@SubscribeEvent
public void onBlockHighlight(DrawBlockHighlightEvent e) {
    GL11.glPushMatrix();
    if (e.player.getCurrentEquippedItem() != null) {
        Item i = e.player.getCurrentEquippedItem().getItem();
        if (Block.getBlockFromItem(i) instanceof RLMBlockContainer && e.target.getBlockPos() != null) {
            if (e.player.worldObj.getBlockState(e.target.getBlockPos()).getBlock() != Blocks.air) {
                if (TileEntityRendererDispatcher.instance != null) {
                    RLMBlockContainer b = (RLMBlockContainer) Block.getBlockFromItem(i);
                    if (b != null) {
                        BlockPos p = e.target.getBlockPos();
                        GL11.glTranslated(p.getX(), p.getY(), p.getZ());
                        // if
                        // (b.createNewTileEntity(Minecraft.getMinecraft().theWorld,
                        // 0) != null);
                        // TileEntityRendererDispatcher.instance.renderTileEntity(b.createNewTileEntity(Minecraft.getMinecraft().theWorld,
                        // 0),0.0f,1);
                    }
                }
            }
        }
    }
    GL11.glPopMatrix();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号