本文整理汇总了Java中micdoodle8.mods.galacticraft.api.vector.Vector3.modifyPositionFromSide方法的典型用法代码示例。如果您正苦于以下问题:Java Vector3.modifyPositionFromSide方法的具体用法?Java Vector3.modifyPositionFromSide怎么用?Java Vector3.modifyPositionFromSide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类micdoodle8.mods.galacticraft.api.vector.Vector3
的用法示例。
在下文中一共展示了Vector3.modifyPositionFromSide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setBlockBoundsBasedOnState
import micdoodle8.mods.galacticraft.api.vector.Vector3; //导入方法依赖的package包/类
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
{
float var5;
float var6;
Block frameID = GCBlocks.airLockFrame;
Block sealID = GCBlocks.airLockSeal;
Block idXMin = world.getBlock(x - 1, y, z);
Block idXMax = world.getBlock(x + 1, y, z);
if (idXMin != frameID && idXMax != frameID && idXMin != sealID && idXMax != sealID)
{
var5 = 0.25F;
var6 = 0.5F;
this.setBlockBounds(0.5F - var5, 0.0F, 0.5F - var6, 0.5F + var5, 1.0F, 0.5F + var6);
}
else
{
int adjacentCount = 0;
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
if (dir != ForgeDirection.UP && dir != ForgeDirection.DOWN)
{
Vector3 thisVec = new Vector3(x, y, z);
thisVec = thisVec.modifyPositionFromSide(dir);
Block blockID = thisVec.getBlock(world);
if (blockID == GCBlocks.airLockFrame || blockID == GCBlocks.airLockSeal)
{
adjacentCount++;
}
}
}
if (adjacentCount == 4)
{
this.setBlockBounds(0.0F, 0.25F, 0.0F, 1.0F, 0.75F, 1.0F);
}
else
{
var5 = 0.5F;
var6 = 0.25F;
this.setBlockBounds(0.5F - var5, 0.0F, 0.5F - var6, 0.5F + var5, 1.0F, 0.5F + var6);
}
}
}