use of net.minecraft.block.state.BlockStateContainer in project ImmersiveEngineering by BluSunrize.
the class BlockMetalDevice1 method createBlockState.
@Override
protected BlockStateContainer createBlockState() {
BlockStateContainer base = super.createBlockState();
IUnlistedProperty[] unlisted = (base instanceof ExtendedBlockState) ? ((ExtendedBlockState) base).getUnlistedProperties().toArray(new IUnlistedProperty[0]) : new IUnlistedProperty[0];
unlisted = Arrays.copyOf(unlisted, unlisted.length + 1);
unlisted[unlisted.length - 1] = IEProperties.CONNECTIONS;
return new ExtendedBlockState(this, base.getProperties().toArray(new IProperty[0]), unlisted);
}
use of net.minecraft.block.state.BlockStateContainer in project ImmersiveEngineering by BluSunrize.
the class BlockConnector method createBlockState.
@Override
protected BlockStateContainer createBlockState() {
BlockStateContainer base = super.createBlockState();
IUnlistedProperty[] unlisted = (base instanceof ExtendedBlockState) ? ((ExtendedBlockState) base).getUnlistedProperties().toArray(new IUnlistedProperty[0]) : new IUnlistedProperty[0];
unlisted = Arrays.copyOf(unlisted, unlisted.length + 1);
unlisted[unlisted.length - 1] = IEProperties.CONNECTIONS;
return new ExtendedBlockState(this, base.getProperties().toArray(new IProperty[0]), unlisted);
}
use of net.minecraft.block.state.BlockStateContainer in project ImmersiveEngineering by BluSunrize.
the class BlockIEBase method createNotTempBlockState.
protected BlockStateContainer createNotTempBlockState() {
IProperty[] array = new IProperty[1 + this.additionalProperties.length];
array[0] = this.property;
for (int i = 0; i < this.additionalProperties.length; i++) array[1 + i] = this.additionalProperties[i];
if (this.additionalUnlistedProperties.length > 0)
return new ExtendedBlockState(this, array, additionalUnlistedProperties);
return new BlockStateContainer(this, array);
}
Aggregations