本文整理汇总了Java中net.minecraft.block.Block.isFullCube方法的典型用法代码示例。如果您正苦于以下问题:Java Block.isFullCube方法的具体用法?Java Block.isFullCube怎么用?Java Block.isFullCube使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.Block
的用法示例。
在下文中一共展示了Block.isFullCube方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isBlockNormalCube
import net.minecraft.block.Block; //导入方法依赖的package包/类
/**
* Checks if a block's material is opaque, and that it takes up a full cube
*/
public boolean isBlockNormalCube(BlockPos pos, boolean _default)
{
if (!this.isValid(pos))
{
return _default;
}
else
{
Chunk chunk = this.chunkProvider.provideChunk(pos);
if (chunk.isEmpty())
{
return _default;
}
else
{
Block block = this.getBlockState(pos).getBlock();
return block.getMaterial().isOpaque() && block.isFullCube();
}
}
}
示例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: 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();
}
}
}
示例4: doesBlockHaveSolidTopSurface
import net.minecraft.block.Block; //导入方法依赖的package包/类
public static boolean doesBlockHaveSolidTopSurface(IBlockAccess blockAccess, BlockPos pos)
{
IBlockState iblockstate = blockAccess.getBlockState(pos);
Block block = iblockstate.getBlock();
return block.getMaterial().isOpaque() && block.isFullCube() ? true : (block instanceof BlockStairs ? iblockstate.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP : (block instanceof BlockSlab ? iblockstate.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP : (block instanceof BlockHopper ? true : (block instanceof BlockSnow ? ((Integer)iblockstate.getValue(BlockSnow.LAYERS)).intValue() == 7 : false))));
}
示例5: getBlockIsFull
import net.minecraft.block.Block; //导入方法依赖的package包/类
@Deprecated
public static boolean getBlockIsFull(Block block) {
//return block != null && block.renderAsNormalBlock(); // < 1.8 MCP 9.10
return block != null && block.isFullCube(null);
}
示例6: func_179474_a
import net.minecraft.block.Block; //导入方法依赖的package包/类
private boolean func_179474_a(World worldIn, BlockPos p_179474_2_, Block p_179474_3_, Block p_179474_4_, Block p_179474_5_)
{
return !p_179474_3_.canPlaceBlockAt(worldIn, p_179474_2_) ? false : (p_179474_4_.getMaterial() != Material.air ? false : (p_179474_5_.getMaterial() == Material.air ? false : p_179474_5_.isFullCube()));
}
示例7: func_181065_a
import net.minecraft.block.Block; //导入方法依赖的package包/类
private boolean func_181065_a(BlockPos p_181065_1_)
{
IBlockState iblockstate = this.theWorld.getBlockState(p_181065_1_);
Block block = iblockstate.getBlock();
return block == Blocks.air ? true : !block.isFullCube();
}
示例8: checkBlock
import net.minecraft.block.Block; //导入方法依赖的package包/类
private static boolean checkBlock(Block p_checkBlock_0_, IBlockState p_checkBlock_1_)
{
if (p_checkBlock_0_.isFullCube())
{
return false;
}
else if (p_checkBlock_0_.isOpaqueCube())
{
return false;
}
else if (p_checkBlock_0_ instanceof BlockSnow)
{
return false;
}
else if (!(p_checkBlock_0_ instanceof BlockBush) || !(p_checkBlock_0_ instanceof BlockDoublePlant) && !(p_checkBlock_0_ instanceof BlockFlower) && !(p_checkBlock_0_ instanceof BlockMushroom) && !(p_checkBlock_0_ instanceof BlockSapling) && !(p_checkBlock_0_ instanceof BlockTallGrass))
{
if (!(p_checkBlock_0_ instanceof BlockFence) && !(p_checkBlock_0_ instanceof BlockFenceGate) && !(p_checkBlock_0_ instanceof BlockFlowerPot) && !(p_checkBlock_0_ instanceof BlockPane) && !(p_checkBlock_0_ instanceof BlockReed) && !(p_checkBlock_0_ instanceof BlockWall))
{
if (p_checkBlock_0_ instanceof BlockRedstoneTorch && p_checkBlock_1_.getValue(BlockTorch.FACING) == EnumFacing.UP)
{
return true;
}
else
{
if (p_checkBlock_0_ instanceof BlockLever)
{
Object object = p_checkBlock_1_.getValue(BlockLever.FACING);
if (object == BlockLever.EnumOrientation.UP_X || object == BlockLever.EnumOrientation.UP_Z)
{
return true;
}
}
return false;
}
}
else
{
return true;
}
}
else
{
return true;
}
}