public void DrawImage(string imagePath, Vector3 targetPosition, int maxSize = 100) { MagickImage image = new MagickImage(imagePath); // resize image if (image.Width > maxSize || image.Height > maxSize) { if (image.Width > image.Height) { image.Resize(maxSize, (int)Math.Floor((double)(image.Height * maxSize) / image.Width)); } else { image.Resize((int)Math.Floor((double)(image.Width * maxSize) / image.Height), maxSize); } } // get all pixels var pixelCollection = image.GetPixels(); // iterate over pixels and draw a block for (int y = 0; y < image.Height; y++) { for (int x = 0; x < image.Width; x++) { var pixel = pixelCollection.GetPixel(x, image.Height - y - 1); var color = GetClosestMinecraftColor(pixel.ToColor()); var brick = new Wool(color); _world.SetBlock(brick, targetPosition + new Vector3(x, y, 0)); } } }
public void Carve(Mobile from, Item item) { if (DateTime.Now < m_NextWoolTime) { // This sheep is not yet ready to be shorn. PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500449, from.Client); } else if (Controlled && ControlMaster != from) { // The sheep nimbly escapes your attempts to shear his wool. PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500453, from.Client); } else { Item wool = new Wool(Map == Map.Felucca ? 2 : 1); if (!from.AddToBackpack(wool)) { from.SendLocalizedMessage(500451); // You would not be able to place the gathered wool in your backpack! wool.Delete(); } else { from.SendLocalizedMessage(500452); // You place the gathered wool into your backpack. if (from is PlayerMobile && QuestHelper.HasQuest <ShearingKnowledgeQuest>(from as PlayerMobile)) { from.SendLocalizedMessage(1113241); // You shear some fresh, Britannian wool from the sheep. from.AddToBackpack(new BritannianWool(Map == Map.Felucca ? 2 : 1)); } NextWoolTime = DateTime.Now + TimeSpan.FromHours(3.0); // TODO: Proper time delay } } }
public MainPageViewModel(Dictionary <string, BookDto> books) { _rubin = new Rubin(); _wool = new Wool(); _portrait = new Portrait(); _prayer = new Prayer(); foreach (var i in books) { if (i.Key == "Rubin") { RubinTitle = i.Value.Title; RubinComments = i.Value.Comments.ToString(); RubinLikes = i.Value.Likes.ToString(); } if (i.Key == "Wool") { WoolTitle = i.Value.Title; WoolComments = i.Value.Comments.ToString(); WoolLikes = i.Value.Likes.ToString(); } if (i.Key == "Prayer") { PrayerTitle = i.Value.Title; PrayerComments = i.Value.Comments.ToString(); PrayerLikes = i.Value.Likes.ToString(); } if (i.Key == "Portrait") { PortraitTitle = i.Value.Title; PortraitComments = i.Value.Comments.ToString(); PortraitLikes = i.Value.Likes.ToString(); } } }
public void DrawImage(string imagePath, Vector3 targetPosition, int maxSize = 100) { using (var stream = File.OpenRead(imagePath)) { var image = new Image(stream); Image <ImageColor, uint> resized = null; // resize image if (image.Width > maxSize || image.Height > maxSize) { resized = (image.Width > image.Height) ? image.Resize(maxSize, (int)Math.Floor((double)(image.Height * maxSize) / image.Width)) : image.Resize((int)Math.Floor((double)(image.Width * maxSize) / image.Height), maxSize); } resized = resized ?? image; // get all pixels using (var pixels = resized.Lock()) { // iterate over pixels and draw a block for (int y = 0; y < resized.Height; y++) { for (int x = 0; x < resized.Width; x++) { var pixel = pixels[x, resized.Height - y - 1]; var color = GetClosestMinecraftColor(pixel); var brick = new Wool(color); _world.SetBlock(brick, targetPosition + new Vector3(x, y, 0)); } } } } }
public void Carve(Mobile from, Item item) { if (DateTime.UtcNow < m_NextWoolTime) { // This sheep is not yet ready to be shorn. from.SendMessage("This goat is not yet ready to be shorn."); return; } from.SendLocalizedMessage(500452); // You place the gathered wool into your backpack. double woolbonus = 1; if (m_MotherBreed == GoatBreed.Angora || m_FatherBreed == GoatBreed.Angora) { woolbonus += (IsPurebred() ? 3.00 : 1.50); } if (m_MotherBreed == GoatBreed.Cashmere || m_FatherBreed == GoatBreed.Cashmere) { woolbonus += (IsPurebred() ? 2.00 : 1.00); } Wool w = new Wool(); w.Amount = (int)woolbonus; w.Hue = Hue; //ToDo: different types of wool. Requires modifying tailoring system. from.AddToBackpack(w); NextWoolTime = DateTime.UtcNow + TimeSpan.FromHours(3.0); // TODO: Proper time delay }
public Armours[] InitArmours() { Armours[] armArr = new Armours[4]; armArr[0] = new Wool(); armArr[1] = new Leather(); armArr[2] = new Steel(); armArr[3] = new Chainmail(); return(armArr); }
public void Carve(Mobile from, Item item) { if (DateTime.UtcNow < m_NextWoolTime) { // This sheep is not yet ready to be shorn. PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500449, from.NetState); return; } from.SendLocalizedMessage(500452); // You place the gathered wool into your backpack. //from.AddToBackpack( new Wool( Map == Map.Felucca ? 2 : 1 ) ); double woolbonus = 0; if (m_MotherBreed == SheepBreed.Cormo || m_FatherBreed == SheepBreed.Cormo) { woolbonus += (IsPurebred() ? 3.00 : 1.50); } if (m_MotherBreed == SheepBreed.Cotswold || m_FatherBreed == SheepBreed.Cotswold) { woolbonus += (IsPurebred() ? 2.00 : 1.00); } if (m_MotherBreed == SheepBreed.Swaledale || m_FatherBreed == SheepBreed.Swaledale) { woolbonus += (IsPurebred() ? 2.00 : 1.00); } if (m_MotherBreed == SheepBreed.Coopworth || m_FatherBreed == SheepBreed.Coopworth) { woolbonus += (IsPurebred() ? 2.00 : 1.00); } if (m_MotherBreed == SheepBreed.Racka || m_FatherBreed == SheepBreed.Racka) { woolbonus += (IsPurebred() ? 1.50 : .75); } if (m_MotherBreed == SheepBreed.Latxa || m_FatherBreed == SheepBreed.Latxa) { woolbonus += (IsPurebred() ? 1.00 : .50); } if (m_MotherBreed == SheepBreed.Awassi || m_FatherBreed == SheepBreed.Awassi) { woolbonus += (IsPurebred() ? 1.00 : .50); } Wool w = new Wool(); w.Amount = (int)woolbonus; w.Hue = Hue; //ToDo: different types of wool. Requires modifying tailoring system. from.AddToBackpack(w); NextWoolTime = DateTime.UtcNow + TimeSpan.FromHours(3.0); // TODO: Proper time delay }
public override void OnResponse(NetState sender, RelayInfo info) { switch (info.ButtonID) { case 0: { break; } case (int)Buttons.Iron: { m_step[m_itemnum] = new IronIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.DullCopper: { m_step[m_itemnum] = new DullCopperIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.ShadowIron: { m_step[m_itemnum] = new ShadowIronIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Copper: { m_step[m_itemnum] = new CopperIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Bronze: { m_step[m_itemnum] = new BronzeIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Gold: { m_step[m_itemnum] = new GoldIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Agapite: { m_step[m_itemnum] = new AgapiteIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Verite: { m_step[m_itemnum] = new VeriteIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Valorite: { m_step[m_itemnum] = new ValoriteIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Oak: { m_step[m_itemnum] = new Log(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Pine: { m_step[m_itemnum] = new PineLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Redwood: { m_step[m_itemnum] = new RedwoodLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.WhitePine: { m_step[m_itemnum] = new WhitePineLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Ashwood: { m_step[m_itemnum] = new AshwoodLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.SilverBirch: { m_step[m_itemnum] = new SilverBirchLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Silver: { m_step[m_itemnum] = new SilverIngot(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Yew: { m_step[m_itemnum] = new YewLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.BlackOak: { m_step[m_itemnum] = new BlackOakLog(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.SulfurousAsh: { m_step[m_itemnum] = new SulfurousAsh(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.ZoogiFungus: { m_step[m_itemnum] = new ZoogiFungus(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.FertileDirt: { m_step[m_itemnum] = new FertileDirt(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.PigIron: { m_step[m_itemnum] = new PigIron(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.NoxCrystal: { m_step[m_itemnum] = new NoxCrystal(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Diamond: { m_step[m_itemnum] = new Diamond(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Wool: { m_step[m_itemnum] = new Wool(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Bone: { m_step[m_itemnum] = new Bone(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Citrine: { m_step[m_itemnum] = new Citrine(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.BlackPearl: { m_step[m_itemnum] = new BlackPearl(); m_itemnum += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Decrease: { if (m_amt > 1) { m_amt -= 1; } m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Increase: { m_amt += 1; m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6])); break; } case (int)Buttons.Cancel: { m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null)); break; } case (int)Buttons.OK: { //check for and consume ingredients here Container pack = m_player.Backpack; if (m_step[6] == null) { m_player.SendMessage("You must pick 6 steps"); m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null)); break; } bool allres = true; for (int i = 1; i < 7; i++) { Item itm = (Item)m_step[i]; int packamt = m_player.Backpack.GetAmount(itm.GetType()); if (packamt < m_amt) { m_player.SendMessage("You do not have enough {0} to attempt this", itm.GetType().Name); allres = false; } } if (allres) { for (int i = 1; i < 7; i++) { Item itm = (Item)m_step[i]; m_player.Backpack.ConsumeTotal(m_step[i].GetType(), m_amt); m_player.SendMessage("Step {0} consumes {1} {2}", i.ToString(), m_amt.ToString(), itm.GetType().Name); } } else { m_player.SendMessage("Please try again when you have all of the needed resources"); return; } if (m_step[1] is AgapiteIngot && m_step[2] is BlackOakLog && m_step[3] is AgapiteIngot && m_step[4] is ShadowIronIngot && m_step[5] is Bone && m_step[6] is AgapiteIngot) { if (m_player.Backpack != null) { m_player.AddToBackpack(new BloodrockIngot(m_amt)); } break; } if (m_step[1] is ValoriteIngot && m_step[2] is WhitePineLog && m_step[3] is ValoriteIngot && m_step[4] is CopperIngot && m_step[5] is FertileDirt && m_step[6] is SilverBirchLog) { if (m_player.Backpack != null) { m_player.AddToBackpack(new SteelIngot(m_amt)); } break; } if (m_step[1] is ShadowIronIngot && m_step[2] is AshwoodLog && m_step[3] is VeriteIngot && m_step[4] is ShadowIronIngot && m_step[5] is NoxCrystal && m_step[6] is ShadowIronIngot) { if (m_player.Backpack != null) { m_player.AddToBackpack(new AdamantiteIngot(m_amt)); } break; } if (m_step[1] is IronIngot && m_step[2] is SilverBirchLog && m_step[3] is ValoriteIngot && m_step[4] is IronIngot && m_step[5] is Citrine && m_step[6] is SilverBirchLog) { if (m_player.Backpack != null) { m_player.AddToBackpack(new IthilmarIngot(m_amt)); } break; } if (m_step[1] is SilverIngot && m_step[2] is GoldIngot && m_step[3] is Diamond && m_step[4] is SilverIngot && m_step[5] is GoldIngot && m_step[6] is SilverIngot) { if (m_player.Backpack != null) { m_player.AddToBackpack(new ElectrumIngot(m_amt)); } break; } if (m_step[1] is PigIron && m_player.IsGoblin()) { if (m_player.Backpack != null) { m_player.AddToBackpack(new SkazzIngot(m_amt)); } break; } m_player.SendMessage("You fail to create a new alloy and your materials are lost"); m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null)); break; } } }
//Gives professions a weapon to start with. public void InitialArmour() { Wool wool = new Wool(); }
public static Block GetBlockById(byte blockId) { Block block = null; if (CustomBlockFactory != null) { block = CustomBlockFactory.GetBlockById(blockId); } if (block != null) return block; if (blockId == 0) block = new Air(); else if (blockId == 1) block = new Stone(); else if (blockId == 2) block = new Grass(); else if (blockId == 3) block = new Dirt(); else if (blockId == 4) block = new Cobblestone(); else if (blockId == 5) block = new Planks(); else if (blockId == 6) block = new Sapling(); else if (blockId == 7) block = new Bedrock(); else if (blockId == 8) block = new FlowingWater(); else if (blockId == 9) block = new StationaryWater(); else if (blockId == 10) block = new FlowingLava(); else if (blockId == 11) block = new StationaryLava(); else if (blockId == 12) block = new Sand(); else if (blockId == 13) block = new Gravel(); else if (blockId == 14) block = new GoldOre(); else if (blockId == 15) block = new IronOre(); else if (blockId == 16) block = new CoalOre(); else if (blockId == 17) block = new Log(); else if (blockId == 18) block = new Leaves(); else if (blockId == 19) block = new Sponge(); else if (blockId == 20) block = new Glass(); else if (blockId == 21) block = new LapisOre(); else if (blockId == 22) block = new LapisBlock(); else if (blockId == 23) block = new Dispenser(); else if (blockId == 24) block = new Sandstone(); else if (blockId == 25) block = new NoteBlock(); else if (blockId == 26) block = new Bed(); else if (blockId == 27) block = new GoldenRail(); else if (blockId == 28) block = new DetectorRail(); else if (blockId == 30) block = new Cobweb(); else if (blockId == 31) block = new TallGrass(); else if (blockId == 32) block = new DeadBush(); else if (blockId == 35) block = new Wool(); else if (blockId == 37) block = new YellowFlower(); else if (blockId == 38) block = new Flower(); else if (blockId == 39) block = new BrownMushroom(); else if (blockId == 40) block = new RedMushroom(); else if (blockId == 41) block = new GoldBlock(); else if (blockId == 42) block = new IronBlock(); else if (blockId == 43) block = new DoubleStoneSlab(); else if (blockId == 44) block = new StoneSlab(); else if (blockId == 45) block = new Bricks(); else if (blockId == 46) block = new Tnt(); else if (blockId == 47) block = new Bookshelf(); else if (blockId == 48) block = new MossStone(); else if (blockId == 49) block = new Obsidian(); else if (blockId == 50) block = new Torch(); else if (blockId == 51) block = new Fire(); else if (blockId == 52) block = new MonsterSpawner(); else if (blockId == 53) block = new OakWoodStairs(); else if (blockId == 54) block = new Chest(); else if (blockId == 55) block = new RedstoneWire(); else if (blockId == 56) block = new DiamondOre(); else if (blockId == 57) block = new DiamondBlock(); else if (blockId == 58) block = new CraftingTable(); else if (blockId == 59) block = new Wheat(); else if (blockId == 60) block = new Farmland(); else if (blockId == 61) block = new Furnace(); else if (blockId == 62) block = new LitFurnace(); else if (blockId == 63) block = new StandingSign(); else if (blockId == 64) block = new WoodenDoor(); else if (blockId == 65) block = new Ladder(); else if (blockId == 66) block = new Rail(); else if (blockId == 67) block = new CobblestoneStairs(); else if (blockId == 68) block = new WallSign(); else if (blockId == 69) block = new Lever(); else if (blockId == 70) block = new StonePressurePlate(); else if (blockId == 71) block = new IronDoor(); else if (blockId == 72) block = new WoodenPressurePlate(); else if (blockId == 73) block = new RedstoneOre(); else if (blockId == 74) block = new LitRedstoneOre(); else if (blockId == 75) block = new UnlitRedstoneTorch(); else if (blockId == 76) block = new RedstoneTorch(); else if (blockId == 77) block = new StoneButton(); else if (blockId == 78) block = new SnowLayer(); else if (blockId == 79) block = new Ice(); else if (blockId == 80) block = new Snow(); else if (blockId == 81) block = new Cactus(); else if (blockId == 82) block = new Clay(); else if (blockId == 83) block = new Reeds(); else if (blockId == 85) block = new Fence(); else if (blockId == 86) block = new Pumpkin(); else if (blockId == 87) block = new Netherrack(); else if (blockId == 88) block = new SoulSand(); else if (blockId == 89) block = new Glowstone(); else if (blockId == 90) block = new Portal(); else if (blockId == 91) block = new LitPumpkin(); else if (blockId == 92) block = new Cake(); else if (blockId == 93) block = new UnpoweredRepeater(); else if (blockId == 94) block = new PoweredRepeater(); else if (blockId == 95) block = new InvisibleBedrock(); else if (blockId == 96) block = new Trapdoor(); else if (blockId == 97) block = new MonsterEgg(); else if (blockId == 98) block = new StoneBrick(); else if (blockId == 99) block = new BrownMushroomBlock(); else if (blockId == 100) block = new RedMushroomBlock(); else if (blockId == 101) block = new IronBars(); else if (blockId == 102) block = new GlassPane(); else if (blockId == 103) block = new Melon(); else if (blockId == 106) block = new Vine(); else if (blockId == 107) block = new FenceGate(); else if (blockId == 108) block = new BrickStairs(); else if (blockId == 109) block = new StoneBrickStairs(); else if (blockId == 110) block = new Mycelium(); else if (blockId == 111) block = new Waterlily(); else if (blockId == 112) block = new NetherBrick(); else if (blockId == 113) block = new NetherBrickFence(); else if (blockId == 114) block = new NetherBrickStairs(); else if (blockId == 115) block = new NetherWart(); else if (blockId == 116) block = new EnchantingTable(); else if (blockId == 117) block = new BrewingStand(); else if (blockId == 120) block = new EndPortalFrame(); else if (blockId == 121) block = new EndStone(); else if (blockId == 122) block = new LitRedstoneLamp(); else if (blockId == 123) block = new RedstoneLamp(); else if (blockId == 126) block = new ActivatorRail(); else if (blockId == 127) block = new Cocoa(); else if (blockId == 128) block = new SandStoneStairs(); else if (blockId == 129) block = new EmeraldOre(); else if (blockId == 131) block = new TripwireHook(); else if (blockId == 132) block = new Tripwire(); else if (blockId == 133) block = new EmeraldBlock(); else if (blockId == 134) block = new SpruceWoodStairs(); else if (blockId == 135) block = new BirchWoodStairs(); else if (blockId == 136) block = new JungleWoodStairs(); else if (blockId == 139) block = new CobblestoneWall(); else if (blockId == 140) block = new FlowerPot(); else if (blockId == 141) block = new Carrots(); else if (blockId == 142) block = new Potatoes(); else if (blockId == 143) block = new WoodenButton(); else if (blockId == 144) block = new Skull(); else if (blockId == 145) block = new Anvil(); else if (blockId == 146) block = new TrappedChest(); else if (blockId == 147) block = new LightWeightedPressurePlate(); else if (blockId == 148) block = new HeavyWeightedPressurePlate(); else if (blockId == 151) block = new DaylightDetector(); else if (blockId == 152) block = new RedstoneBlock(); else if (blockId == 153) block = new QuartzOre(); else if (blockId == 155) block = new QuartzBlock(); else if (blockId == 156) block = new QuartzStairs(); else if (blockId == 157) block = new DoubleWoodSlab(); else if (blockId == 158) block = new WoodSlab(); else if (blockId == 159) block = new StainedHardenedClay(); else if (blockId == 161) block = new AcaciaLeaves(); else if (blockId == 162) block = new AcaciaLog(); else if (blockId == 163) block = new AcaciaStairs(); else if (blockId == 164) block = new DarkOakStairs(); else if (blockId == 167) block = new IronTrapdoor(); else if (blockId == 170) block = new HayBlock(); else if (blockId == 171) block = new Carpet(); else if (blockId == 172) block = new HardenedClay(); else if (blockId == 173) block = new CoalBlock(); else if (blockId == 174) block = new PackedIce(); else if (blockId == 175) block = new Sunflower(); else if (blockId == 178) block = new DaylightDetectorInverted(); else if (blockId == 183) block = new SpruceFenceGate(); else if (blockId == 184) block = new BirchFenceGate(); else if (blockId == 185) block = new JungleFenceGate(); else if (blockId == 186) block = new DarkOakFenceGate(); else if (blockId == 187) block = new AcaciaFenceGate(); else if (blockId == 198) block = new GrassPath(); else if (blockId == 199) block = new ItemFrame(); else if (blockId == 243) block = new Podzol(); else if (blockId == 244) block = new Beetroot(); else if (blockId == 245) block = new Stonecutter(); else if (blockId == 246) block = new GlowingObsidian(); else if (blockId == 247) block = new NetherReactorCore(); else { // Log.DebugFormat(@" // // Add this missing block to the BlockFactory // else if (blockId == {1}) block = new {0}(); // // public class {0} : Block // {{ // internal {0}() : base({1}) // {{ // }} // }} //", "Missing", blockId); block = new Block(blockId); } return block; }