當前位置: 首頁>>代碼示例>>Java>>正文


Java Material.PORTAL屬性代碼示例

本文整理匯總了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);
	
}
 
開發者ID:Bedrockbreaker,項目名稱:rtap,代碼行數:12,代碼來源:blockRamen.java

示例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);
	
}
 
開發者ID:Bedrockbreaker,項目名稱:rtap,代碼行數:13,代碼來源:blockJello.java

示例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;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:40,代碼來源:BlockFluidBase.java

示例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;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:39,代碼來源:BlockFluidClassic.java

示例5: BlockPortal

public BlockPortal()
{
    super(Material.PORTAL, false);
    this.setDefaultState(this.blockState.getBaseState().withProperty(AXIS, EnumFacing.Axis.X));
    this.setTickRandomly(true);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:BlockPortal.java

示例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;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockDynamicLiquid.java

示例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;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:50,代碼來源:BlockFluidBase.java


注:本文中的net.minecraft.block.material.Material.PORTAL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。