Exemple #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;
 }
Exemple #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;
 }
Exemple #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);
 }
Exemple #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);
        }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #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"));
        }
Exemple #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);
 }
Exemple #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);
 }
 /// <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);
 }
Exemple #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);
 }
Exemple #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"));
        }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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"));
 }
Exemple #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"));
        }
Exemple #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);
 }