protected void SetDoubleSlab(Level world, BlockCoordinates coordinates) { Block slab = _doubleSlabId == -1 ? BlockFactory.GetBlockByName(GetType().Name.Replace("Slab", "DoubleSlab")) : BlockFactory.GetBlockById(_doubleSlabId); slab.Coordinates = coordinates; slab.SetState(GetState().States); world.SetBlock(slab); }
protected void SetDoubleSlab(Level world, BlockCoordinates coordinates) { Block slab = BlockFactory.GetBlockById(_doubleSlabId); slab.Coordinates = coordinates; slab.SetState(GetState().States); world.SetBlock(slab); }
public static Block GetBlockById(int blockId, byte metadata) { int runtimeId = (int)GetRuntimeId(blockId, metadata); BlockStateContainer blockState = BlockPalette[runtimeId]; Block block = GetBlockById(blockState.Id); block.SetState(blockState.States); return(block); }