类net.minecraftforge.common.property.ExtendedBlockState源码实例Demo

下面列出了怎么用net.minecraftforge.common.property.ExtendedBlockState的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: customstuff4   文件: BlockMixin.java
@Override
protected BlockStateContainer createBlockState()
{
    BlockStateContainer superState = super.createBlockState();
    List<IProperty<?>> superProperties = Lists.newArrayList(superState.getProperties());
    superProperties.addAll(Arrays.asList(getProperties()));

    if (superState instanceof ExtendedBlockState)
    {
        IUnlistedProperty<?>[] unlistedProperties = ((ExtendedBlockState) superState).getUnlistedProperties().toArray(new IUnlistedProperty<?>[0]);

        return new ExtendedBlockState(this, ContentBlockBaseWithSubtypes.insertSubtype(superProperties), unlistedProperties);
    } else
    {
        return new BlockStateContainer(this, ContentBlockBaseWithSubtypes.insertSubtype(superProperties));
    }
}
 
源代码2 项目: customstuff4   文件: BlockFluidTest.java
@Test
@SuppressWarnings("unchecked")
public void testProperties()
{
    ContentBlockFluid content = new ContentBlockFluid();
    content.id = "test_getSubtype";

    Block block = content.createBlock();
    ExtendedBlockState state = (ExtendedBlockState) block.getBlockState();
    Collection<IProperty<?>> properties = state.getProperties();
    assertEquals(1, properties.size());
    assertEquals(5, state.getUnlistedProperties().size());
}
 
源代码3 项目: TFC2   文件: BlockLeaves2.java
/*******************************************************************************
 * 3. Blockstate 
 *******************************************************************************/

@Override
protected BlockStateContainer createBlockState()
{
	return new ExtendedBlockState(this, new IProperty[]{META_PROPERTY, BlockLeaves.FANCY}, new IUnlistedProperty[]{ B3DLoader.B3DFrameProperty.INSTANCE });
}
 
源代码4 项目: TFC2   文件: BlockFirepit.java
/*******************************************************************************
 * 3. Blockstate 
 *******************************************************************************/


@Override
protected BlockStateContainer createBlockState()
{
	return new ExtendedBlockState(this, new IProperty[]{LIT, TOOL}, new IUnlistedProperty[]{});
}
 
源代码5 项目: enderutilities   文件: BlockBarrel.java
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[] { FACING_H, CREATIVE,
            LABEL_UP, LABEL_DOWN, LABEL_FRONT, LABEL_BACK, LABEL_LEFT, LABEL_RIGHT },
            new IUnlistedProperty<?>[] { CAMOBLOCKSTATE, CAMOBLOCKSTATEEXTENDED });
}
 
源代码6 项目: EmergingTechnology   文件: TidalGenerator.java
@Override
public ExtendedBlockState createBlockState() {
    return new ExtendedBlockState(this, new IProperty[] { FACING, Properties.StaticProperty },
            new IUnlistedProperty[] { Properties.AnimationProperty });
}
 
源代码7 项目: EmergingTechnology   文件: Scrubber.java
@Override
public ExtendedBlockState createBlockState() {
    return new ExtendedBlockState(this, new IProperty[] { FACING, Properties.StaticProperty }, new IUnlistedProperty[]{ Properties.AnimationProperty });
}
 
源代码8 项目: EmergingTechnology   文件: Harvester.java
@Override
public ExtendedBlockState createBlockState() {
    return new ExtendedBlockState(this, new IProperty[] { FACING, Properties.StaticProperty },
            new IUnlistedProperty[] { Properties.AnimationProperty });
}
 
源代码9 项目: EmergingTechnology   文件: Wind.java
@Override
public ExtendedBlockState createBlockState() {
    return new ExtendedBlockState(this, new IProperty[] { FACING, Properties.StaticProperty }, new IUnlistedProperty[]{ Properties.AnimationProperty });
}
 
源代码10 项目: GregTech   文件: BlockMachine.java
@Override
protected BlockStateContainer createBlockState() {
    return new ExtendedBlockState(this, new IProperty[]{OPAQUE}, new IUnlistedProperty[]{HARVEST_TOOL, HARVEST_LEVEL});
}
 
源代码11 项目: YouTubeModdingTutorial   文件: BlockGenerator.java
@Override
protected BlockStateContainer createBlockState() {
    return new ExtendedBlockState(this,
            new IProperty[] {Properties.StaticProperty, FACING_HORIZ },
            new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
源代码12 项目: Logistics-Pipes-2   文件: PipeRouted.java
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
源代码13 项目: Logistics-Pipes-2   文件: PipeChassisMkI.java
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
源代码14 项目: Logistics-Pipes-2   文件: PipeBlocking.java
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
源代码15 项目: Logistics-Pipes-2   文件: PipeBasic.java
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
源代码16 项目: TFC2   文件: BlockSmallVessel.java
@Override
protected BlockStateContainer createBlockState()
{
	return new ExtendedBlockState(this, new IProperty[]{}, new IUnlistedProperty[]{INVENTORY});
}
 
源代码17 项目: TFC2   文件: BlockPitKiln.java
@Override
protected BlockStateContainer createBlockState()
{
	return new ExtendedBlockState(this, new IProperty[]{FILL, FILLTYPE}, new IUnlistedProperty[]{INVENTORY});
}
 
源代码18 项目: TFC2   文件: BlockAnvil.java
@Override
protected BlockStateContainer createBlockState()
{
	return new ExtendedBlockState(this, new IProperty[]{FACING}, new IUnlistedProperty[]{INVENTORY});
}
 
源代码19 项目: enderutilities   文件: BlockPortalFrame.java
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty<?>[] { CAMOBLOCKSTATE, CAMOBLOCKSTATEEXTENDED });
}
 
源代码20 项目: enderutilities   文件: BlockElevator.java
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[] { COLOR }, new IUnlistedProperty<?>[] { CAMOBLOCKSTATE, CAMOBLOCKSTATEEXTENDED });
}
 
源代码21 项目: enderutilities   文件: BlockDrawbridge.java
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[] { ADVANCED, FACING }, new IUnlistedProperty<?>[] { CAMOBLOCKSTATE, CAMOBLOCKSTATEEXTENDED });
}
 
源代码22 项目: enderutilities   文件: BlockElevatorSlab.java
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[] { COLOR, HALF }, new IUnlistedProperty<?>[] { CAMOBLOCKSTATE, CAMOBLOCKSTATEEXTENDED });
}
 
 类方法
 同包方法