本文整理汇总了Java中net.minecraft.util.Direction.offsetZ方法的典型用法代码示例。如果您正苦于以下问题:Java Direction.offsetZ方法的具体用法?Java Direction.offsetZ怎么用?Java Direction.offsetZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.Direction
的用法示例。
在下文中一共展示了Direction.offsetZ方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_147453_f
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public void func_147453_f(int p_147453_1_, int p_147453_2_, int p_147453_3_, Block p_147453_4_)
{
for (int var5 = 0; var5 < 4; ++var5)
{
int var6 = p_147453_1_ + Direction.offsetX[var5];
int var7 = p_147453_3_ + Direction.offsetZ[var5];
Block var8 = this.getBlock(var6, p_147453_2_, var7);
if (Blocks.unpowered_comparator.func_149907_e(var8))
{
var8.onNeighborBlockChange(this, var6, p_147453_2_, var7, p_147453_4_);
}
else if (var8.isNormalCube())
{
var6 += Direction.offsetX[var5];
var7 += Direction.offsetZ[var5];
Block var9 = this.getBlock(var6, p_147453_2_, var7);
if (Blocks.unpowered_comparator.func_149907_e(var9))
{
var9.onNeighborBlockChange(this, var6, p_147453_2_, var7, p_147453_4_);
}
}
}
}
示例2: func_150139_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public static boolean func_150139_a(IBlockAccess p_150139_0_, int p_150139_1_, int p_150139_2_, int p_150139_3_, int p_150139_4_, int p_150139_5_)
{
int var6 = p_150139_1_ + Direction.offsetX[p_150139_5_];
int var8 = p_150139_3_ + Direction.offsetZ[p_150139_5_];
Block var9 = p_150139_0_.getBlock(var6, p_150139_2_, var8);
boolean var10 = (p_150139_4_ & 2) == 2;
int var11;
if (var9 == Blocks.tripwire_hook)
{
var11 = p_150139_0_.getBlockMetadata(var6, p_150139_2_, var8);
int var13 = var11 & 3;
return var13 == Direction.rotateOpposite[p_150139_5_];
}
else if (var9 == Blocks.tripwire)
{
var11 = p_150139_0_.getBlockMetadata(var6, p_150139_2_, var8);
boolean var12 = (var11 & 2) == 2;
return var10 == var12;
}
else
{
return false;
}
}
示例3: func_149903_h
import net.minecraft.util.Direction; //导入方法依赖的package包/类
protected int func_149903_h(World p_149903_1_, int p_149903_2_, int p_149903_3_, int p_149903_4_, int p_149903_5_)
{
int var6 = super.func_149903_h(p_149903_1_, p_149903_2_, p_149903_3_, p_149903_4_, p_149903_5_);
int var7 = func_149895_l(p_149903_5_);
int var8 = p_149903_2_ + Direction.offsetX[var7];
int var9 = p_149903_4_ + Direction.offsetZ[var7];
Block var10 = p_149903_1_.getBlock(var8, p_149903_3_, var9);
if (var10.hasComparatorInputOverride())
{
var6 = var10.getComparatorInputOverride(p_149903_1_, var8, p_149903_3_, var9, Direction.rotateOpposite[var7]);
}
else if (var6 < 15 && var10.isNormalCube())
{
var8 += Direction.offsetX[var7];
var9 += Direction.offsetZ[var7];
var10 = p_149903_1_.getBlock(var8, p_149903_3_, var9);
if (var10.hasComparatorInputOverride())
{
var6 = var10.getComparatorInputOverride(p_149903_1_, var8, p_149903_3_, var9, Direction.rotateOpposite[var7]);
}
}
return var6;
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:27,代码来源:BlockRedstoneComparator.java
示例4: doRender
import net.minecraft.util.Direction; //导入方法依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(EntityItemFrame par1EntityItemFrame, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
double var10 = par1EntityItemFrame.posX - par2 - 0.5D;
double var12 = par1EntityItemFrame.posY - par4 - 0.5D;
double var14 = par1EntityItemFrame.posZ - par6 - 0.5D;
int var16 = par1EntityItemFrame.field_146063_b + Direction.offsetX[par1EntityItemFrame.hangingDirection];
int var17 = par1EntityItemFrame.field_146064_c;
int var18 = par1EntityItemFrame.field_146062_d + Direction.offsetZ[par1EntityItemFrame.hangingDirection];
GL11.glTranslated((double)var16 - var10, (double)var17 - var12, (double)var18 - var14);
if (par1EntityItemFrame.getDisplayedItem() != null && par1EntityItemFrame.getDisplayedItem().getItem() == Items.filled_map)
{
this.func_147915_b(par1EntityItemFrame);
}
else
{
this.renderFrameItemAsBlock(par1EntityItemFrame);
}
this.func_82402_b(par1EntityItemFrame);
GL11.glPopMatrix();
this.func_147914_a(par1EntityItemFrame, par2 + (double)((float)Direction.offsetX[par1EntityItemFrame.hangingDirection] * 0.3F), par4 - 0.25D, par6 + (double)((float)Direction.offsetZ[par1EntityItemFrame.hangingDirection] * 0.3F));
}
示例5: func_150139_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public static boolean func_150139_a(IBlockAccess p_150139_0_, int p_150139_1_, int p_150139_2_, int p_150139_3_, int p_150139_4_, int p_150139_5_)
{
int j1 = p_150139_1_ + Direction.offsetX[p_150139_5_];
int k1 = p_150139_3_ + Direction.offsetZ[p_150139_5_];
Block block = p_150139_0_.getBlock(j1, p_150139_2_, k1);
boolean flag = (p_150139_4_ & 2) == 2;
int l1;
if (block == Blocks.tripwire_hook)
{
l1 = p_150139_0_.getBlockMetadata(j1, p_150139_2_, k1);
int i2 = l1 & 3;
return i2 == Direction.rotateOpposite[p_150139_5_];
}
else if (block == Blocks.tripwire)
{
l1 = p_150139_0_.getBlockMetadata(j1, p_150139_2_, k1);
boolean flag1 = (l1 & 2) == 2;
return flag == flag1;
}
else
{
return false;
}
}
示例6: getInputStrength
import net.minecraft.util.Direction; //导入方法依赖的package包/类
protected int getInputStrength(World p_149903_1_, int p_149903_2_, int p_149903_3_, int p_149903_4_, int p_149903_5_)
{
int i1 = super.getInputStrength(p_149903_1_, p_149903_2_, p_149903_3_, p_149903_4_, p_149903_5_);
int j1 = getDirection(p_149903_5_);
int k1 = p_149903_2_ + Direction.offsetX[j1];
int l1 = p_149903_4_ + Direction.offsetZ[j1];
Block block = p_149903_1_.getBlock(k1, p_149903_3_, l1);
if (block.hasComparatorInputOverride())
{
i1 = block.getComparatorInputOverride(p_149903_1_, k1, p_149903_3_, l1, Direction.rotateOpposite[j1]);
}
else if (i1 < 15 && block.isNormalCube())
{
k1 += Direction.offsetX[j1];
l1 += Direction.offsetZ[j1];
block = p_149903_1_.getBlock(k1, p_149903_3_, l1);
if (block.hasComparatorInputOverride())
{
i1 = block.getComparatorInputOverride(p_149903_1_, k1, p_149903_3_, l1, Direction.rotateOpposite[j1]);
}
}
return i1;
}
示例7: func_72148_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public static boolean func_72148_a(IBlockAccess par0IBlockAccess, int par1, int par2, int par3, int par4, int par5)
{
int j1 = par1 + Direction.offsetX[par5];
int k1 = par3 + Direction.offsetZ[par5];
int l1 = par0IBlockAccess.getBlockId(j1, par2, k1);
boolean flag = (par4 & 2) == 2;
int i2;
if (l1 == Block.tripWireSource.blockID)
{
i2 = par0IBlockAccess.getBlockMetadata(j1, par2, k1);
int j2 = i2 & 3;
return j2 == Direction.rotateOpposite[par5];
}
else if (l1 == Block.tripWire.blockID)
{
i2 = par0IBlockAccess.getBlockMetadata(j1, par2, k1);
boolean flag1 = (i2 & 2) == 2;
return flag == flag1;
}
else
{
return false;
}
}
示例8: func_72148_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public static boolean func_72148_a(IBlockAccess world, int x, int y, int z, int l, int i) {
int j1 = x + Direction.offsetX[i];
int k1 = z + Direction.offsetZ[i];
Block l1 = world.getBlock(j1, y, k1);
boolean flag = (l & 2) == 2;
int i2;
if (l1 == BlockLaserBeamSource.instance)
{
i2 = world.getBlockMetadata(j1, y, k1);
int j2 = i2 & 3;
return j2 == Direction.rotateOpposite[i];
//return true;
}
else if (l1 == BlockLaserBeam.instance)
{
i2 = world.getBlockMetadata(j1, y, k1);
boolean flag1 = (i2 & 2) == 2;
return flag == flag1;
}
else
{
return false;
}
}
示例9: Size
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public Size(World p_i45415_1_, int p_i45415_2_, int p_i45415_3_, int p_i45415_4_, int p_i45415_5_)
{
this.worldObj = p_i45415_1_;
this.field_150865_b = p_i45415_5_;
this.field_150863_d = BlockEpicProportionsPortal.field_150001_a[p_i45415_5_][0];
this.field_150866_c = BlockEpicProportionsPortal.field_150001_a[p_i45415_5_][1];
for (int i1 = p_i45415_3_; p_i45415_3_ > i1 - 21 && p_i45415_3_ > 0 && this.getBlockMaterial(p_i45415_1_.getBlock(p_i45415_2_, p_i45415_3_ - 1, p_i45415_4_)); --p_i45415_3_)
{
;
}
int j1 = this.func_150853_a(p_i45415_2_, p_i45415_3_, p_i45415_4_, this.field_150863_d) - 1;
if (j1 >= 0)
{
this.field_150861_f = new ChunkCoordinates(p_i45415_2_ + j1 * Direction.offsetX[this.field_150863_d], p_i45415_3_, p_i45415_4_ + j1 * Direction.offsetZ[this.field_150863_d]);
this.field_150868_h = this.func_150853_a(this.field_150861_f.posX, this.field_150861_f.posY, this.field_150861_f.posZ, this.field_150866_c);
if (this.field_150868_h < 2 || this.field_150868_h > 21)
{
this.field_150861_f = null;
this.field_150868_h = 0;
}
}
if (this.field_150861_f != null)
{
this.field_150862_g = this.func_150858_a();
}
}
示例10: func_150853_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
protected int func_150853_a(int x, int y, int z, int p_150853_4_)
{
int j1 = Direction.offsetX[p_150853_4_];
int k1 = Direction.offsetZ[p_150853_4_];
int i1;
Block block;
for (i1 = 0; i1 < 22; ++i1)
{
block = this.worldObj.getBlock(x + j1 * i1, y, z + k1 * i1);
if (!this.getBlockMaterial(block))
{
break;
}
Block block1 = this.worldObj.getBlock(x + j1 * i1, y - 1, z + k1 * i1);
if (block1 != Blocks.stone)
{
break;
}
}
block = this.worldObj.getBlock(x + j1 * i1, y, z + k1 * i1);
return block == Blocks.stone ? i1 : 0;
}
示例11: func_150859_c
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public void func_150859_c()
{
for (int i = 0; i < this.field_150868_h; ++i)
{
int j = this.field_150861_f.posX + Direction.offsetX[this.field_150866_c] * i;
int k = this.field_150861_f.posZ + Direction.offsetZ[this.field_150866_c] * i;
for (int l = 0; l < this.field_150862_g; ++l)
{
int i1 = this.field_150861_f.posY + l;
this.worldObj.setBlock(j, i1, k, BlockLoader.BlockEpicProportionsPortal, this.field_150865_b, 2);
}
}
}
示例12: func_149903_h
import net.minecraft.util.Direction; //导入方法依赖的package包/类
protected int func_149903_h(World p_149903_1_, int p_149903_2_, int p_149903_3_, int p_149903_4_, int p_149903_5_)
{
int var6 = func_149895_l(p_149903_5_);
int var7 = p_149903_2_ + Direction.offsetX[var6];
int var8 = p_149903_4_ + Direction.offsetZ[var6];
int var9 = p_149903_1_.getIndirectPowerLevelTo(var7, p_149903_3_, var8, Direction.directionToFacing[var6]);
return var9 >= 15 ? var9 : Math.max(var9, p_149903_1_.getBlock(var7, p_149903_3_, var8) == Blocks.redstone_wire ? p_149903_1_.getBlockMetadata(var7, p_149903_3_, var8) : 0);
}
示例13: Size
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public Size(World p_i45415_1_, int p_i45415_2_, int p_i45415_3_, int p_i45415_4_, int p_i45415_5_)
{
this.field_150867_a = p_i45415_1_;
this.field_150865_b = p_i45415_5_;
this.field_150863_d = BlockPortal.field_150001_a[p_i45415_5_][0];
this.field_150866_c = BlockPortal.field_150001_a[p_i45415_5_][1];
for (int var6 = p_i45415_3_; p_i45415_3_ > var6 - 21 && p_i45415_3_ > 0 && this.func_150857_a(p_i45415_1_.getBlock(p_i45415_2_, p_i45415_3_ - 1, p_i45415_4_)); --p_i45415_3_)
{
;
}
int var7 = this.func_150853_a(p_i45415_2_, p_i45415_3_, p_i45415_4_, this.field_150863_d) - 1;
if (var7 >= 0)
{
this.field_150861_f = new ChunkCoordinates(p_i45415_2_ + var7 * Direction.offsetX[this.field_150863_d], p_i45415_3_, p_i45415_4_ + var7 * Direction.offsetZ[this.field_150863_d]);
this.field_150868_h = this.func_150853_a(this.field_150861_f.posX, this.field_150861_f.posY, this.field_150861_f.posZ, this.field_150866_c);
if (this.field_150868_h < 2 || this.field_150868_h > 21)
{
this.field_150861_f = null;
this.field_150868_h = 0;
}
}
if (this.field_150861_f != null)
{
this.field_150862_g = this.func_150858_a();
}
}
示例14: func_150853_a
import net.minecraft.util.Direction; //导入方法依赖的package包/类
protected int func_150853_a(int p_150853_1_, int p_150853_2_, int p_150853_3_, int p_150853_4_)
{
int var6 = Direction.offsetX[p_150853_4_];
int var7 = Direction.offsetZ[p_150853_4_];
int var5;
Block var8;
for (var5 = 0; var5 < 22; ++var5)
{
var8 = this.field_150867_a.getBlock(p_150853_1_ + var6 * var5, p_150853_2_, p_150853_3_ + var7 * var5);
if (!this.func_150857_a(var8))
{
break;
}
Block var9 = this.field_150867_a.getBlock(p_150853_1_ + var6 * var5, p_150853_2_ - 1, p_150853_3_ + var7 * var5);
if (var9 != Blocks.obsidian)
{
break;
}
}
var8 = this.field_150867_a.getBlock(p_150853_1_ + var6 * var5, p_150853_2_, p_150853_3_ + var7 * var5);
return var8 == Blocks.obsidian ? var5 : 0;
}
示例15: func_150859_c
import net.minecraft.util.Direction; //导入方法依赖的package包/类
public void func_150859_c()
{
for (int var1 = 0; var1 < this.field_150868_h; ++var1)
{
int var2 = this.field_150861_f.posX + Direction.offsetX[this.field_150866_c] * var1;
int var3 = this.field_150861_f.posZ + Direction.offsetZ[this.field_150866_c] * var1;
for (int var4 = 0; var4 < this.field_150862_g; ++var4)
{
int var5 = this.field_150861_f.posY + var4;
this.field_150867_a.setBlock(var2, var5, var3, Blocks.portal, this.field_150865_b, 2);
}
}
}