public static Block FromBlockState(BlockState blockState) { if (blockState == BlockStates.Air()) { return(new BlockAir()); } else if (blockState.IsId(BlockId.Stone)) { var stone = new BlockStone(); stone.BlockState = blockState; return(stone); } else if (blockState == BlockStates.GrassBlock()) { return(new BlockGrassBlock()); } else if (blockState == BlockStates.Dirt()) { return(new BlockDirt()); } else if (blockState == BlockStates.Cobblestone()) { return(new BlockCobblestone()); } else if (blockState.IsId(BlockId.WoodPlanks)) { var planks = new BlockWoodPlanks(); planks.BlockState = blockState; return(planks); } else if (blockState.IsId(BlockId.Sapling)) { var planks = new BlockSapling(); planks.BlockState = blockState; return(planks); } else if (blockState == BlockStates.Bedrock()) { return(new BlockBedrock()); } else if (blockState == BlockStates.Water()) { return(new BlockWater()); } else { return(new BlockAir()); } }
public BlockCobblestone() { FullBlock = true; LightOpacity = 255; Translucent = false; LightValue = 0; UseNeighborBrightness = false; BlockHardness = 1.0f; BlockResistance = 0.0f; EnableStats = false; NeedsRandomTick = true; IsBlockContainer = false; BlockSoundType = null; BlockParticleGravity = 1.0f; BlockState = BlockStates.Cobblestone(); UnlocalizedName = "cobblestone"; }