示例#1
0
 /// <summary>
 /// Intializes a new map color
 /// </summary>
 /// <param name="color">The color of the block</param>
 /// <param name="block">The block which has the color</param>
 /// <param name="supportBlock">A block which has to be under the actual block</param>
 /// <param name="id">The id of the color</param>
 /// <param name="height">0 If the block can be placed on same height as last block. -1 if lower and +1 if higher. The height thing should go in the north direction.</param>
 public MapColor(int id, ID.Block block, RGBColor color, int height = 0, ID.Block?supportBlock = null)
 {
     Color        = color;
     Block        = block;
     SupportBlock = supportBlock;
     Height       = height;
     Id           = id;
 }
示例#2
0
 /// <summary>
 /// Intializes a new map color
 /// </summary>
 /// <param name="blue">The blue color part</param>
 /// <param name="green">The green color part</param>
 /// <param name="red">The red color part</param>
 /// <param name="block">The block which has the color</param>
 /// <param name="supportBlock">A block which has to be under the actual block</param>
 /// <param name="id">The id of the color</param>
 /// <param name="height">0 If the block can be placed on same height as last block. -1 if lower and +1 if higher. The height thing should go in the north direction.</param>
 public MapColor(int id, ID.Block block, byte red, byte green, byte blue, int height = 0, ID.Block?supportBlock = null)
 {
     Color        = new RGBColor(red, green, blue);
     Block        = block;
     SupportBlock = supportBlock;
     Height       = height;
     Id           = id;
 }
示例#3
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.tall_grass ||
            block == SharpCraft.ID.Block.tall_seagrass ||
            block == SharpCraft.ID.Block.large_fern ||
            block == SharpCraft.ID.Block.sunflower ||
            block == SharpCraft.ID.Block.lilac ||
            block == SharpCraft.ID.Block.rose_bush ||
            block == SharpCraft.ID.Block.peony);
 }
示例#4
0
        /// <summary>
        /// Tests if the given block type fits this type of block object
        /// </summary>
        /// <param name="block">The block to test</param>
        /// <returns>true if the block fits</returns>
        public new static bool FitsBlock(ID.Block block)
        {
            string blockName = block.ToString();

            return(block == SharpCraft.ID.Block.bone_block ||
                   block == SharpCraft.ID.Block.hay_block ||
                   block == SharpCraft.ID.Block.purpur_pillar ||
                   block == SharpCraft.ID.Block.quartz_block ||
                   blockName.Contains("log") ||
                   blockName.Contains("wood") ||
                   blockName.Contains("hyphae") ||
                   block == SharpCraft.ID.Block.basalt ||
                   block == SharpCraft.ID.Block.crimson_stem ||
                   block == SharpCraft.ID.Block.stripped_crimson_stem ||
                   block == SharpCraft.ID.Block.stripped_warped_stem ||
                   block == SharpCraft.ID.Block.warped_stem);
        }
示例#5
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.redstone_wall_torch);
 }
示例#6
0
 /// <summary>
 /// Outputs the file name for the given block's loot table
 /// </summary>
 /// <param name="block">The block to get the file name of</param>
 /// <returns>A loot table file name</returns>
 public static string Block(ID.Block block)
 {
     return("blocks/" + block.Value);
 }
示例#7
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.frosted_ice);
 }
示例#8
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.observer);
 }
示例#9
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.piston || block == SharpCraft.ID.Block.sticky_piston);
 }
示例#10
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.respawn_anchor);
 }
示例#11
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.snow);
 }
示例#12
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.wall_torch || block == SharpCraft.ID.Block.soul_wall_torch);
 }
示例#13
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.furnace || block == SharpCraft.ID.Block.blast_furnace || block == SharpCraft.ID.Block.smoker);
 }
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.beetroots || block == SharpCraft.ID.Block.nether_wart || block == SharpCraft.ID.Block.sweet_berry_bush);
 }
示例#15
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.sugar_cane || block == SharpCraft.ID.Block.cactus);
 }
示例#16
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.brewing_stand);
 }
示例#17
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.weeping_vines || block == SharpCraft.ID.Block.twisting_vines);
 }
示例#18
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.anvil || block == SharpCraft.ID.Block.chipped_anvil || block == SharpCraft.ID.Block.damaged_anvil);
 }
示例#19
0
 /// <summary>
 /// Creates a new block which is the given type of block
 /// </summary>
 /// <param name="type">The block's ID/Type</param>
 public Block(ID.Block type)
 {
     ID = type;
 }
示例#20
0
        /// <summary>
        /// Tests if the given block type fits this type of block object
        /// </summary>
        /// <param name="block">The block to test</param>
        /// <returns>true if the block fits</returns>
        public new static bool FitsBlock(ID.Block block)
        {
            string blockName = block.ToString();

            return(blockName.Contains("pane") || blockName.Contains("iron_bars"));
        }
示例#21
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.lantern || block == SharpCraft.ID.Block.soul_lantern);
 }
示例#22
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.grindstone);
 }
示例#23
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.attached_melon_stem || block == SharpCraft.ID.Block.attached_pumpkin_stem);
 }
示例#24
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.bamboo_sapling);
 }
示例#25
0
        /// <summary>
        /// Tests if the given block type fits this type of block object
        /// </summary>
        /// <param name="block">The block to test</param>
        /// <returns>true if the block fits</returns>
        public new static bool FitsBlock(ID.Block block)
        {
            string blockName = block.ToString();

            return(blockName.Contains("wall") && !blockName.Contains("banner") && !blockName.Contains("sign") && !blockName.Contains("fan") && !blockName.Contains("head") && !blockName.Contains("torch"));
        }
示例#26
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.chest || block == SharpCraft.ID.Block.trapped_chest);
 }
示例#27
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.composter);
 }
示例#28
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block.ToString().Contains("_door"));
 }
示例#29
0
        /// <summary>
        /// Tests if the given block type fits this type of block object
        /// </summary>
        /// <param name="block">The block to test</param>
        /// <returns>true if the block fits</returns>
        public new static bool FitsBlock(ID.Block block)
        {
            string blockName = block.ToString();

            return(blockName.Contains("trapdoor"));
        }
示例#30
0
 /// <summary>
 /// Tests if the given block type fits this type of block object
 /// </summary>
 /// <param name="block">The block to test</param>
 /// <returns>true if the block fits</returns>
 public new static bool FitsBlock(ID.Block block)
 {
     return(block == SharpCraft.ID.Block.dropper || block == SharpCraft.ID.Block.dispenser);
 }