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);
 }
Beispiel #2
0
 private static bool DefaultIsSolidOnFaceHandler(BlockInfo info, BlockFace face)
 {
     return(true);
 }
Beispiel #3
0
 private static bool DefaultBlockRightClickedHandler(World world, Coordinates3D coordinates, BlockInfo block, BlockFace face, ItemInfo?item)
 {
     return(true);
 }
Beispiel #4
0
 private static BoundingBox?DefaultBoundingBoxHandler(BlockInfo info)
 {
     return(new BoundingBox(Vector3.Zero, Vector3.One));
 }
Beispiel #5
0
 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)));
 }