本文整理汇总了Java中net.minecraft.block.Block.getBlockBoundsMaxX方法的典型用法代码示例。如果您正苦于以下问题:Java Block.getBlockBoundsMaxX方法的具体用法?Java Block.getBlockBoundsMaxX怎么用?Java Block.getBlockBoundsMaxX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.Block
的用法示例。
在下文中一共展示了Block.getBlockBoundsMaxX方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_180549_a
import net.minecraft.block.Block; //导入方法依赖的package包/类
private void func_180549_a(Block blockIn, double p_180549_2_, double p_180549_4_, double p_180549_6_, BlockPos pos, float p_180549_9_, float p_180549_10_, double p_180549_11_, double p_180549_13_, double p_180549_15_)
{
if (blockIn.isFullCube())
{
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
double d0 = ((double)p_180549_9_ - (p_180549_4_ - ((double)pos.getY() + p_180549_13_)) / 2.0D) * 0.5D * (double)this.getWorldFromRenderManager().getLightBrightness(pos);
if (d0 >= 0.0D)
{
if (d0 > 1.0D)
{
d0 = 1.0D;
}
double d1 = (double)pos.getX() + blockIn.getBlockBoundsMinX() + p_180549_11_;
double d2 = (double)pos.getX() + blockIn.getBlockBoundsMaxX() + p_180549_11_;
double d3 = (double)pos.getY() + blockIn.getBlockBoundsMinY() + p_180549_13_ + 0.015625D;
double d4 = (double)pos.getZ() + blockIn.getBlockBoundsMinZ() + p_180549_15_;
double d5 = (double)pos.getZ() + blockIn.getBlockBoundsMaxZ() + p_180549_15_;
float f = (float)((p_180549_2_ - d1) / 2.0D / (double)p_180549_10_ + 0.5D);
float f1 = (float)((p_180549_2_ - d2) / 2.0D / (double)p_180549_10_ + 0.5D);
float f2 = (float)((p_180549_6_ - d4) / 2.0D / (double)p_180549_10_ + 0.5D);
float f3 = (float)((p_180549_6_ - d5) / 2.0D / (double)p_180549_10_ + 0.5D);
worldrenderer.pos(d1, d3, d4).tex((double)f, (double)f2).color(1.0F, 1.0F, 1.0F, (float)d0).endVertex();
worldrenderer.pos(d1, d3, d5).tex((double)f, (double)f3).color(1.0F, 1.0F, 1.0F, (float)d0).endVertex();
worldrenderer.pos(d2, d3, d5).tex((double)f1, (double)f3).color(1.0F, 1.0F, 1.0F, (float)d0).endVertex();
worldrenderer.pos(d2, d3, d4).tex((double)f1, (double)f2).color(1.0F, 1.0F, 1.0F, (float)d0).endVertex();
}
}
}
示例2: func_180549_a
import net.minecraft.block.Block; //导入方法依赖的package包/类
private void func_180549_a(Block blockIn, double p_180549_2_, double p_180549_4_, double p_180549_6_, BlockPos pos,
float p_180549_9_, float p_180549_10_, double p_180549_11_, double p_180549_13_, double p_180549_15_) {
if (blockIn.isFullCube()) {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
double d0 = ((double) p_180549_9_ - (p_180549_4_ - ((double) pos.getY() + p_180549_13_)) / 2.0D) * 0.5D
* (double) this.getWorldFromRenderManager().getLightBrightness(pos);
if (d0 >= 0.0D) {
if (d0 > 1.0D) {
d0 = 1.0D;
}
double d1 = (double) pos.getX() + blockIn.getBlockBoundsMinX() + p_180549_11_;
double d2 = (double) pos.getX() + blockIn.getBlockBoundsMaxX() + p_180549_11_;
double d3 = (double) pos.getY() + blockIn.getBlockBoundsMinY() + p_180549_13_ + 0.015625D;
double d4 = (double) pos.getZ() + blockIn.getBlockBoundsMinZ() + p_180549_15_;
double d5 = (double) pos.getZ() + blockIn.getBlockBoundsMaxZ() + p_180549_15_;
float f = (float) ((p_180549_2_ - d1) / 2.0D / (double) p_180549_10_ + 0.5D);
float f1 = (float) ((p_180549_2_ - d2) / 2.0D / (double) p_180549_10_ + 0.5D);
float f2 = (float) ((p_180549_6_ - d4) / 2.0D / (double) p_180549_10_ + 0.5D);
float f3 = (float) ((p_180549_6_ - d5) / 2.0D / (double) p_180549_10_ + 0.5D);
worldrenderer.pos(d1, d3, d4).tex((double) f, (double) f2).color(1.0F, 1.0F, 1.0F, (float) d0)
.endVertex();
worldrenderer.pos(d1, d3, d5).tex((double) f, (double) f3).color(1.0F, 1.0F, 1.0F, (float) d0)
.endVertex();
worldrenderer.pos(d2, d3, d5).tex((double) f1, (double) f3).color(1.0F, 1.0F, 1.0F, (float) d0)
.endVertex();
worldrenderer.pos(d2, d3, d4).tex((double) f1, (double) f2).color(1.0F, 1.0F, 1.0F, (float) d0)
.endVertex();
}
}
}
示例3: addBlockHitEffects
import net.minecraft.block.Block; //导入方法依赖的package包/类
/**
* Adds block hit particles for the specified block
*/
public void addBlockHitEffects(BlockPos pos, EnumFacing side)
{
IBlockState iblockstate = this.worldObj.getBlockState(pos);
Block block = iblockstate.getBlock();
if (block.getRenderType() != -1)
{
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();
float f = 0.1F;
double d0 = (double)i + this.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - (double)(f * 2.0F)) + (double)f + block.getBlockBoundsMinX();
double d1 = (double)j + this.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - (double)(f * 2.0F)) + (double)f + block.getBlockBoundsMinY();
double d2 = (double)k + this.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - (double)(f * 2.0F)) + (double)f + block.getBlockBoundsMinZ();
if (side == EnumFacing.DOWN)
{
d1 = (double)j + block.getBlockBoundsMinY() - (double)f;
}
if (side == EnumFacing.UP)
{
d1 = (double)j + block.getBlockBoundsMaxY() + (double)f;
}
if (side == EnumFacing.NORTH)
{
d2 = (double)k + block.getBlockBoundsMinZ() - (double)f;
}
if (side == EnumFacing.SOUTH)
{
d2 = (double)k + block.getBlockBoundsMaxZ() + (double)f;
}
if (side == EnumFacing.WEST)
{
d0 = (double)i + block.getBlockBoundsMinX() - (double)f;
}
if (side == EnumFacing.EAST)
{
d0 = (double)i + block.getBlockBoundsMaxX() + (double)f;
}
this.addEffect((new EntityDiggingFX(this.worldObj, d0, d1, d2, 0.0D, 0.0D, 0.0D, iblockstate)).func_174846_a(pos).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F));
}
}