Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- public class mod_Pamflowers extends BaseMod
- {
- public static final Block blackPlant = new BlockBlackPlant(152, 0).setBlockName("blackPlant");
- public static final Block bluePlant = new BlockBluePlant(153, 0).setBlockName("bluePlant");
- public static final Block brownPlant = new BlockBrownPlant(154, 0).setBlockName("brownPlant");
- public static final Block cyanPlant = new BlockCyanPlant(155, 0).setBlockName("cyanPlant");
- public static final Block greenPlant = new BlockGreenPlant(156, 0).setBlockName("greenPlant");
- public static final Block greyPlant = new BlockGreyPlant(157, 0).setBlockName("greyPlant");
- public static final Block lightbluePlant = new BlockLightBluePlant(158, 0).setBlockName("lightbluePlant");
- public static final Block lightgreyPlant = new BlockLightGreyPlant(159, 0).setBlockName("lightgreyPlant");
- public static final Block limePlant = new BlockLimePlant(160, 0).setBlockName("limePlant");
- public static final Block magentaPlant = new BlockMagentaPlant(161, 0).setBlockName("magentaPlant");
- public static final Block orangePlant = new BlockOrangePlant(162, 0).setBlockName("orangePlant");
- public static final Block pinkPlant = new BlockPinkPlant(163, 0).setBlockName("pinkPlant");
- public static final Block purplePlant = new BlockPurplePlant(164, 0).setBlockName("purplePlant");
- public static final Block whitePlant = new BlockWhitePlant(165, 0).setBlockName("whitePlant");
- public mod_Pamflowers()
- {
- ModLoader.RegisterBlock(blackPlant);
- ModLoader.RegisterBlock(bluePlant);
- ModLoader.RegisterBlock(brownPlant);
- ModLoader.RegisterBlock(cyanPlant);
- ModLoader.RegisterBlock(greenPlant);
- ModLoader.RegisterBlock(greyPlant);
- ModLoader.RegisterBlock(lightbluePlant);
- ModLoader.RegisterBlock(lightgreyPlant);
- ModLoader.RegisterBlock(limePlant);
- ModLoader.RegisterBlock(magentaPlant);
- ModLoader.RegisterBlock(orangePlant);
- ModLoader.RegisterBlock(pinkPlant);
- ModLoader.RegisterBlock(purplePlant);
- ModLoader.RegisterBlock(whitePlant);
- blackPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/blackplant.png");
- bluePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/blueplant.png");
- brownPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/brownplant.png");
- cyanPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/cyanplant.png");
- greenPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/greenplant.png");
- greyPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/greyplant.png");
- lightbluePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/lightblueplant.png");
- lightgreyPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/lightgreyplant.png");
- limePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/limeplant.png");
- magentaPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/magentaplant.png");
- orangePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/orangeplant.png");
- pinkPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/pinkplant.png");
- purplePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/purpleplant.png");
- whitePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/whiteplant.png");
- ModLoader.AddName(blackPlant, "Black Flower");
- ModLoader.AddName(bluePlant, "Blue Flower");
- ModLoader.AddName(brownPlant, "Dying Bush");
- ModLoader.AddName(cyanPlant, "Cyan Flower");
- ModLoader.AddName(greenPlant, "Green Bush");
- ModLoader.AddName(greyPlant, "Grey Flower");
- ModLoader.AddName(lightbluePlant, "Light Blue Flower");
- ModLoader.AddName(lightgreyPlant, "Light Grey Flower");
- ModLoader.AddName(limePlant, "Bright Green Bush");
- ModLoader.AddName(magentaPlant, "Magenta Flower");
- ModLoader.AddName(orangePlant, "Orange Flower");
- ModLoader.AddName(pinkPlant, "Pink Flower");
- ModLoader.AddName(purplePlant, "Purple Flower");
- ModLoader.AddName(whitePlant, "White Flower");
- // Flowers + Wool = Dyed Wool Recipes
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 15), new Object[]
- {
- new ItemStack(mod_Pamflowers.blackPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 11), new Object[]
- {
- new ItemStack(mod_Pamflowers.bluePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 12), new Object[]
- {
- new ItemStack(mod_Pamflowers.brownPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 9), new Object[]
- {
- new ItemStack(mod_Pamflowers.cyanPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 13), new Object[]
- {
- new ItemStack(mod_Pamflowers.greenPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 7), new Object[]
- {
- new ItemStack(mod_Pamflowers.greyPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 3), new Object[]
- {
- new ItemStack(mod_Pamflowers.lightbluePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 8), new Object[]
- {
- new ItemStack(mod_Pamflowers.lightgreyPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 5), new Object[]
- {
- new ItemStack(mod_Pamflowers.limePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 2), new Object[]
- {
- new ItemStack(mod_Pamflowers.magentaPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 1), new Object[]
- {
- new ItemStack(mod_Pamflowers.orangePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 6), new Object[]
- {
- new ItemStack(mod_Pamflowers.pinkPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 10), new Object[]
- {
- new ItemStack(mod_Pamflowers.purplePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 0), new Object[]
- {
- new ItemStack(mod_Pamflowers.whitePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 14), new Object[]
- {
- new ItemStack(Block.plantRed, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 4), new Object[]
- {
- new ItemStack(Block.plantYellow, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
- });
- }
- public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
- {
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenBlackPlant(mod_Pamflowers.blackPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenBluePlant(mod_Pamflowers.bluePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenBrownPlant(mod_Pamflowers.brownPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenCyanPlant(mod_Pamflowers.cyanPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenGreenPlant(mod_Pamflowers.greenPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenGreyPlant(mod_Pamflowers.greyPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenLightBluePlant(mod_Pamflowers.lightbluePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenLightGreyPlant(mod_Pamflowers.lightgreyPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenLimePlant(mod_Pamflowers.limePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenMagentaPlant(mod_Pamflowers.magentaPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenOrangePlant(mod_Pamflowers.orangePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenPinkPlant(mod_Pamflowers.pinkPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenPurplePlant(mod_Pamflowers.purplePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 5; i++)
- {
- int randPosX = chunkX + rand.nextInt(16) + 8;
- int randPosY = rand.nextInt(128);
- int randPosZ = chunkZ + rand.nextInt(16) + 8;
- (new WorldGenWhitePlant(mod_Pamflowers.whitePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- }
- public void RenderInvBlock(RenderBlocks renderblocks, Block block, int i, int j)
- {
- }
- public String Version()
- {
- return "1.7.2";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement