public static void SetBlockInfo(this World world, Coordinates3D coordinates, BlockInfo info) { world.SetBlockId(coordinates, info.BlockId); world.SetMetadata(coordinates, info.Metadata); world.SetSkyLight(coordinates, info.SkyLight); world.SetBlockLight(coordinates, info.BlockLight); }
private static bool DefaultIsSolidOnFaceHandler(BlockInfo info, BlockFace face) { return(true); }
private static bool DefaultBlockRightClickedHandler(World world, Coordinates3D coordinates, BlockInfo block, BlockFace face, ItemInfo?item) { return(true); }
private static BoundingBox?DefaultBoundingBoxHandler(BlockInfo info) { return(new BoundingBox(Vector3.Zero, Vector3.One)); }
private static void DefaultBlockMinedHandler(World world, Coordinates3D coordinates, BlockInfo info) { world.SetBlockId(coordinates, 0); world.SetMetadata(coordinates, 0); world.OnSpawnEntityRequested(new ItemEntity((Vector3)coordinates + new Vector3(0.5), new ItemStack(info.BlockId, 1, info.Metadata))); }