本文整理汇总了Java中net.minecraft.block.material.Material.PORTAL属性的典型用法代码示例。如果您正苦于以下问题:Java Material.PORTAL属性的具体用法?Java Material.PORTAL怎么用?Java Material.PORTAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.block.material.Material
的用法示例。
在下文中一共展示了Material.PORTAL属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: blockRamen
public blockRamen() {
super(Material.PORTAL);
setUnlocalizedName(Reference.RTAPBlocks.BLOCKRAMEN.getUnlocalizedName());
setRegistryName(Reference.RTAPBlocks.BLOCKRAMEN.getRegistryName());
setCreativeTab(Reference.tabRTAP);
setHardness(1F);
setResistance(1.5F);
setSoundType(SoundType.SLIME);
}
示例2: blockJello
public blockJello() {
super(Material.PORTAL);
setUnlocalizedName(Reference.RTAPBlocks.BLOCKJELLO.getUnlocalizedName());
setRegistryName(Reference.RTAPBlocks.BLOCKJELLO.getRegistryName());
setCreativeTab(Reference.tabRTAP);
setHardness(0F);
setResistance(0F);
setLightOpacity(5);
setSoundType(SoundType.SLIME);
}
示例3: canDisplace
/**
* Returns true if the block at (pos) is displaceable. Does not displace the block.
*/
public boolean canDisplace(IBlockAccess world, BlockPos pos)
{
if (world.isAirBlock(pos)) return true;
IBlockState state = world.getBlockState(pos);
if (state.getBlock() == this)
{
return false;
}
if (displacements.containsKey(state.getBlock()))
{
return displacements.get(state.getBlock());
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
int density = getDensity(world, pos);
if (density == Integer.MAX_VALUE)
{
return true;
}
if (this.density > density)
{
return true;
}
else
{
return false;
}
}
示例4: canFlowInto
protected boolean canFlowInto(IBlockAccess world, BlockPos pos)
{
if (world.isAirBlock(pos)) return true;
IBlockState state = world.getBlockState(pos);
if (state.getBlock() == this)
{
return true;
}
if (displacements.containsKey(state.getBlock()))
{
return displacements.get(state.getBlock());
}
Material material = state.getMaterial();
if (material.blocksMovement() ||
material == Material.WATER ||
material == Material.LAVA ||
material == Material.PORTAL)
{
return false;
}
int density = getDensity(world, pos);
if (density == Integer.MAX_VALUE)
{
return true;
}
if (this.density > density)
{
return true;
}
else
{
return false;
}
}
示例5: BlockPortal
public BlockPortal()
{
super(Material.PORTAL, false);
this.setDefaultState(this.blockState.getBaseState().withProperty(AXIS, EnumFacing.Axis.X));
this.setTickRandomly(true);
}
示例6: isBlocked
private boolean isBlocked(World worldIn, BlockPos pos, IBlockState state)
{
Block block = worldIn.getBlockState(pos).getBlock();
return !(block instanceof BlockDoor) && block != Blocks.STANDING_SIGN && block != Blocks.LADDER && block != Blocks.REEDS ? (block.blockMaterial != Material.PORTAL && block.blockMaterial != Material.STRUCTURE_VOID ? block.blockMaterial.blocksMovement() : true) : true;
}
示例7: displaceIfPossible
/**
* Attempt to displace the block at (pos), return true if it was displaced.
*/
public boolean displaceIfPossible(World world, BlockPos pos)
{
if (world.isAirBlock(pos))
{
return true;
}
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
if (block == this)
{
return false;
}
if (displacements.containsKey(block))
{
if (displacements.get(block))
{
if (state.getBlock() != Blocks.SNOW_LAYER) //Forge: Vanilla has a 'bug' where snowballs don't drop like every other block. So special case because ewww...
block.dropBlockAsItem(world, pos, state, 0);
return true;
}
return false;
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
int density = getDensity(world, pos);
if (density == Integer.MAX_VALUE)
{
block.dropBlockAsItem(world, pos, state, 0);
return true;
}
if (this.density > density)
{
return true;
}
else
{
return false;
}
}