ItemTeletoryPortalLinker.java 文件源码

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

项目:TeleToro 作者:
private void linkPortalWithOrigin(EntityPlayer player, World world, ItemStack stack, ControlBlockLocation thisPortal,
        PortalLinkerOrigin remoteInfo) {

    ControlBlockLocation remotePortal = findControllerBlock(world, remoteInfo.pos, STANDARD_SIZER);

    stack.setTagInfo("origin", new NBTTagLong(0));
    stack.setTagInfo("dimid", new NBTTagInt(0));

    if (remotePortal == null) {
        return;
    }

    linkPortalTo(world, thisPortal, remotePortal, remoteInfo.dimId, remoteInfo.side);
    linkPortalTo(world, remotePortal, thisPortal, player.dimension, getSide(player, thisPortal));

    playSound(player);
    stack.damageItem(1, player);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号