public static bool IsBlockForMap(ProtoBlock b, HeightmapType type) { if (b == null || IsAir(b)) { return(false); } if (type == HeightmapType.AllBlocks) { return(true); } else if (type == HeightmapType.SolidBlocks) { return(!IsTransparentBlock(b)); } else if (type == HeightmapType.SolidBlocksNoLiquid) { return(!IsTransparentBlock(b) && !IsLiquid(b) && !b.Compare("minecraft:ice")); } else if (type == HeightmapType.TerrainBlocks) { return(b.CompareMultiple(commonTerrainBlocks) || b.CompareMultiple(waterBlock, lavaBlock)); } else if (type == HeightmapType.TerrainBlocksNoLiquid) { return(b.CompareMultiple(commonTerrainBlocks)); } else { return(false); } }
public static bool IsPlantSustaining(ProtoBlock b) { if (b == null) { return(false); } return(b.CompareMultiple(plantSustainingBlocks)); }
public static bool IsLiquid(ProtoBlock b) { if (b == null) { return(false); } return(b.CompareMultiple(waterBlock, lavaBlock)); }
public static bool IsAir(ProtoBlock b) { if (b == null) { return(false); } return(b.CompareMultiple("minecraft:air", "minecraft:cave_air")); }