本文整理汇总了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);
}
}
}
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}