本文整理匯總了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;
}
}