当前位置: 首页>>代码示例>>Java>>正文


Java ThaumcraftApiHelper.rayTraceIgnoringSource方法代码示例

本文整理汇总了Java中thaumcraft.api.ThaumcraftApiHelper.rayTraceIgnoringSource方法的典型用法代码示例。如果您正苦于以下问题:Java ThaumcraftApiHelper.rayTraceIgnoringSource方法的具体用法?Java ThaumcraftApiHelper.rayTraceIgnoringSource怎么用?Java ThaumcraftApiHelper.rayTraceIgnoringSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thaumcraft.api.ThaumcraftApiHelper的用法示例。


在下文中一共展示了ThaumcraftApiHelper.rayTraceIgnoringSource方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: playVortexEffects

import thaumcraft.api.ThaumcraftApiHelper; //导入方法依赖的package包/类
private void playVortexEffects() {
    for (int a = 0; a < Thaumcraft.proxy.particleCount(1); a++) {
        int tx = this.xCoord + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        int ty = this.yCoord + 1 + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        int tz = this.zCoord + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        if (ty > this.worldObj.getHeightValue(tx, tz)) {
            ty = this.worldObj.getHeightValue(tx, tz);
        }
        Vec3 v1 = Vec3.createVectorHelper(this.xCoord + 0.5D, this.yCoord + 1.5D, this.zCoord + 0.5D);
        Vec3 v2 = Vec3.createVectorHelper(tx + 0.5D, ty + 0.5D, tz + 0.5D);

        MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(this.worldObj, v1, v2, true, false, false);
        if ((mop != null) && (getDistanceFrom(mop.blockX, mop.blockY, mop.blockZ) < 16.0D)) {
            tx = mop.blockX;
            ty = mop.blockY;
            tz = mop.blockZ;
            Block bi = this.worldObj.getBlock(tx, ty, tz);
            int md = this.worldObj.getBlockMetadata(tx, ty, tz);
            if (!bi.isAir(this.worldObj, tx, ty, tz)) {
                Thaumcraft.proxy.hungryNodeFX(this.worldObj, tx, ty, tz, this.xCoord, this.yCoord + 1, this.zCoord, bi, md);
            }
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:25,代码来源:TileEssentiaCompressor.java

示例2: canNodeBeSeen

import thaumcraft.api.ThaumcraftApiHelper; //导入方法依赖的package包/类
public static boolean canNodeBeSeen(TileVisNode source,TileVisNode target)
{		 
 MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(source.getWorldObj(), 
		 Vec3.createVectorHelper(source.xCoord+.5, source.yCoord+.5,source.zCoord+.5),
		 Vec3.createVectorHelper(target.xCoord+.5, target.yCoord+.5,target.zCoord+.5),
		 false, true, false);
 return  mop == null || (mop.typeOfHit==MovingObjectType.BLOCK &&
		 mop.blockX==target.xCoord && mop.blockY==target.yCoord && mop.blockZ==target.zCoord);
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:10,代码来源:VisNetHandler.java

示例3: canNodeBeSeen

import thaumcraft.api.ThaumcraftApiHelper; //导入方法依赖的package包/类
public static boolean canNodeBeSeen(TileVisNode source, TileVisNode target) {
    MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(source.getWorldObj(),
                                                                          Vec3.createVectorHelper(source.xCoord + .5, source.yCoord + .5, source.zCoord + .5),
                                                                          Vec3.createVectorHelper(target.xCoord + .5, target.yCoord + .5, target.zCoord + .5),
                                                                          false, true, false);
    return mop == null || (mop.typeOfHit == MovingObjectType.BLOCK &&
                           mop.blockX == target.xCoord && mop.blockY == target.yCoord && mop.blockZ == target.zCoord);
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:9,代码来源:VisNetHandler.java

示例4: canNodeBeSeen

import thaumcraft.api.ThaumcraftApiHelper; //导入方法依赖的package包/类
public static boolean canNodeBeSeen(TileVisNode source, TileVisNode target) {
	MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(source.getWorldObj(), Vec3.createVectorHelper(source.xCoord + .5, source.yCoord + .5, source.zCoord + .5), Vec3.createVectorHelper(target.xCoord + .5, target.yCoord + .5, target.zCoord + .5), false, true, false);
	return (mop == null) || ( (mop.typeOfHit == MovingObjectType.BLOCK) && (mop.blockX == target.xCoord) && (mop.blockY == target.yCoord) && (mop.blockZ == target.zCoord));
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:5,代码来源:VisNetHandler.java

示例5: canNodeBeSeen

import thaumcraft.api.ThaumcraftApiHelper; //导入方法依赖的package包/类
public static boolean canNodeBeSeen(TileVisNode source, TileVisNode target)
{
    MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(source.getWorldObj(), Vec3.createVectorHelper(source.xCoord + .5, source.yCoord + .5, source.zCoord + .5), Vec3.createVectorHelper(target.xCoord + .5, target.yCoord + .5, target.zCoord + .5), false, true, false);
    return mop == null || (mop.typeOfHit == MovingObjectType.BLOCK &&
            mop.blockX == target.xCoord && mop.blockY == target.yCoord && mop.blockZ == target.zCoord);
}
 
开发者ID:J3FF97,项目名称:Steel-Industries,代码行数:7,代码来源:VisNetHandler.java


注:本文中的thaumcraft.api.ThaumcraftApiHelper.rayTraceIgnoringSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。