Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.kpdus.com/jad.html
- // Decompiler options: packimports(3) braces deadcode
- package net.minecraft.src;
- import java.util.ArrayList;
- import java.util.Map;
- import java.util.Random;
- import org.lwjgl.input.Mouse;
- import net.minecraft.client.Minecraft;
- // Referenced classes of package net.minecraft.src:
- // BaseMod, EntityIguana, ModLoader, EnumCreatureType,
- // EntityStarfish, EntityTreeFrog, EntityPoisonousTreeFrogRed, EntityPoisonousTreeFrogYellow,
- // EntityPoisonousTreeFrogBlue, EntityEIH, Block, ItemStack,
- // Item, BlockFlowerIris, BlockFlowerIrisBase, BlockFlowerPineapple,
- // BlockFlowerPineappleBase, BlockFlower2, BlockFlower3, BlockFlower4,
- // BlockCojoPalmLeaves, RenderIguana, ModelIguana, RenderStarfish,
- // ModelStarfish, RenderTreeFrog, ModelTreeFrog, RenderRedTreeFrog,
- // RenderBlueTreeFrog, RenderYellowTreeFrog, EntityPoisonBlot, RenderPoisonBlot,
- // RenderEIH, ModelEIH, WorldGenFlowers2, WorldGenIris,
- // WorldGenPineapple, WorldGenBamboo, WorldGenEIH, World,
- // WorldGenLargeCojoPalmTrees, WorldGenPalmTreeThreeCojo, WorldGenCojoPalmTrees, EntityPlayerSP,
- // InventoryPlayer, BlockHeadb, BlockThatchBl, BlockThatchSt,
- // BlockThatchSl, BlockThatchDsl, BlockBambooBl, BlockBambooSt,
- // BlockBambooSl, BlockBambooDsl, ItemPinaColada, ItemArmor,
- // ItemFood, StepSound, BlockBamboo, ItemBamboo,
- // BlockCojoPalmWood, BlockCoconut, ItemCoconut, StepSoundSand,
- // BlockSand, BlockCojoPalmSapling, ItemIris, ItemPineapple,
- // ItemTropicalFlowers, ItemCojoPalmSapling
- public class mod_tropicraft extends BaseMod
- {
- protected static ArrayList<String> mobnames;// = new ArrayList<String>();
- protected static ArrayList<Class> classnames;// = new ArrayList<Class>();
- protected static ArrayList<Integer> spawnrates;// = new ArrayList<Integer>();
- protected static ArrayList<EnumCreatureType> creaturetypes;// = new ArrayList<EnumCreatureType>();
- protected static ArrayList<String> othermobnames;// = new ArrayList<String>(); //for entities w/o spawns
- protected static ArrayList<Class> otherclassnames;// = new ArrayList<Class>(); //for entities w/o spawns
- ///////////////////////////////////////////////////////////ML PROP STUFF, DONT TOUCH/////////////////////////////////////////////////
- @MLProp(info="Spawn rate of red poison tree frogs. Normal=9, Off=0", min=0) public static int poisonredfrograrity;
- @MLProp(info="Spawn rate of yellow poison tree frogs. Normal=7, Off=0", min=0) public static int poisonyellowfrograrity;
- @MLProp(info="Spawn rate of blue poison tree frogs. Normal=4, Off=0", min=0) public static int poisonbluefrograrity;
- @MLProp(info="Spawn rate of regular, non-poisonous tree frogs. Normal=8, Off=0", min=0) public static int treefrograrity;
- @MLProp(info="Spawn rate of Man 'O Wars. Normal=40, Off=0", min=0) public static int MOWrarity;
- @MLProp(info="Spawn rate of Easter Island Head(Mob). Normal=11, Off=0", min=0) public static int EIHrarity;
- @MLProp(info="Spawn rate of Iguanas. Normal=15, Off=0", min=0) public static int iggyrarity;
- @MLProp(info="Spawn rate of Starfish. Normal=19, Off=0", min=0) public static int starfishrarity;
- // @MLProp(info="Spawn rate of Monkeys. Normal=12, Off=0", min=0) public static int monkeyrarity;
- public mod_tropicraft()
- {
- ////////////////
- setVals(); //sets values for all regular variables
- addAllEntities(); //this is required
- registerBlocks(); //registers all blocks added
- addNames(); //adds names of all things added in mod
- addModRecipes(); //adds recipes
- addImageOverrides(); //this sets iconindex/blockindexintexture overriding stuff
- addAchievements(); //adds achievements
- addTestRecipes(); //COMMENT OUT DURING FINAL COMPILATION
- ModLoader.SetInGameHook(this, true, false);
- // ModLoader.RegisterKey(this, new KeyBinding("CojoMakesWeather", 37), true);
- // ModLoader.RegisterKey(this, new KeyBinding("CojoMakesWeatherStop", 38), true);
- // ModLoader.RegisterKey(this, new KeyBinding("spawnmow", 39), true);
- ModLoader.AddSmelting(frogleg.shiftedIndex, new ItemStack(froglegcooked));
- /////////////////////////
- }
- private void addTestRecipes() {
- ModLoader.AddRecipe(new ItemStack(Scaleleggings, 19), new Object[] {
- "XX", Character.valueOf('X'), Block.sand});
- //// ModLoader.AddRecipe(new ItemStack(beachFloat, 19), new Object[] {
- // "XX", Character.valueOf('X'), Block.dirt
- // });
- ModLoader.AddRecipe(new ItemStack(Block.fire,20), new Object[] {
- "XY", Character.valueOf('X'), Block.dirt, Character.valueOf('Y'), Block.sand
- });
- // ModLoader.AddRecipe(new ItemStack(coralItem, 20, 1), new Object[]{
- // "XX", "XX", Character.valueOf('X'), Block.dirt
- // });
- //
- // ModLoader.AddRecipe(new ItemStack(chunkwedge, 3), new Object[] {
- // "XY", Character.valueOf('X'), Block.planks, Character.valueOf('Y'), Block.dirt
- // });
- // ModLoader.AddRecipe(new ItemStack(bambooChest, 2), new Object[] {
- // "X", Character.valueOf('X'), Item.sugar
- /// });
- ModLoader.AddRecipe(new ItemStack(Scalehelm, 2), new Object[] {
- "X", Character.valueOf('X'), Block.sand
- });
- ModLoader.AddRecipe(new ItemStack(Scaleboots, 2), new Object[] {
- "X", Character.valueOf('X'), Block.dirt
- });
- ModLoader.AddRecipe(new ItemStack(Scalechestplate, 2), new Object[] {
- "XX", Character.valueOf('X'), Block.dirt
- });
- }
- public static void createEntityList()
- {
- mobnames.add("Iguana");classnames.add(net.minecraft.src.EntityIguana.class);spawnrates.add(iggyrarity);creaturetypes.add(EnumCreatureType.creature);
- mobnames.add("Starfish");classnames.add(net.minecraft.src.EntityStarfish.class);spawnrates.add(starfishrarity);creaturetypes.add(EnumCreatureType.waterCreature);
- mobnames.add("Tree Frog");classnames.add(net.minecraft.src.EntityTreeFrog.class);spawnrates.add(treefrograrity);creaturetypes.add(EnumCreatureType.creature);
- mobnames.add("Poisonous Red Tree Frog");classnames.add(net.minecraft.src.EntityPoisonousTreeFrogRed.class);spawnrates.add(poisonredfrograrity);creaturetypes.add(EnumCreatureType.creature);
- mobnames.add("Poisonous Yellow Tree Frog");classnames.add(net.minecraft.src.EntityPoisonousTreeFrogYellow.class);spawnrates.add(poisonyellowfrograrity);creaturetypes.add(EnumCreatureType.creature);
- mobnames.add("Poisonous Blue Tree Frog");classnames.add(net.minecraft.src.EntityPoisonousTreeFrogBlue.class);spawnrates.add(poisonbluefrograrity);creaturetypes.add(EnumCreatureType.creature);
- mobnames.add("EIH");classnames.add(net.minecraft.src.EntityEIH.class);spawnrates.add(EIHrarity);creaturetypes.add(EnumCreatureType.creature);
- // mobnames.add("ManOfWar");classnames.add(net.minecraft.src.EntityManOfWar.class);spawnrates.add(MOWrarity);creaturetypes.add(EnumCreatureType.waterCreature);
- // othermobnames.add("beach chair");otherclassnames.add(net.minecraft.src.EntityChair.class);
- // othermobnames.add("umbrella");otherclassnames.add(net.minecraft.src.EntityUmbrella.class);
- // othermobnames.add("beach float");otherclassnames.add(net.minecraft.src.EntityBeachFloat.class);
- // othermobnames.add("Poison Blot");otherclassnames.add(net.minecraft.src.EntityPoisonBlot.class);
- }
- public static void addImageOverrides()
- {
- bamboo.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/bamboo.png");
- bambooitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/bambooitem.png");
- iristop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/iristop.png");
- irisbase.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/irisbase.png");
- irisitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/irisitem.png");
- pineappletop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/pineappletop.png");
- pineapplebase.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/pineapplebase.png");
- pineappleitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/pineappleitem.png");
- flower1.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/flower1.png");
- flower2.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/flower2.png");
- flower3.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/flower3.png");
- bamboomugempty.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/bamboomugempty.png");
- bamboomugfull.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/bamboomugfull.png");
- flower1item.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/flower1.png");
- flower2item.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/flower2.png");
- flower3item.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/flower3.png");
- palmSaplingitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/palmSapling.png");
- coconutChunk.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/coconutchunk.png");
- palmLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/palmleavesbrighter.png");
- palmWood.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/palmwood.png");
- purifiedSand.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/purifiedsand.png");
- palmSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/palmSapling.png");
- coconut.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/coconut.png");
- palmWoodBottom = ModLoader.addOverride("/terrain.png", "/tropicalmod/palmwoodbottom.png");
- Scaleboots.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/scaleboots.png");
- Scalehelm.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/scalehelm.png");
- Scaleleggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/scalelegs.png");
- Scalechestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/scalechest.png");
- Scale.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/scale.png");
- shellCommon1.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/commonshell1.png");
- shellCommon2.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/shell2.png");
- shellCommon3.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/shell6.png");
- shellRare1.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/shell3.png");
- shellStarfish.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/shell4.png");
- frogleg.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/frogleg.png");
- froglegcooked.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/froglegcooked.png");
- poisonskin.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/poisonskin.png");
- coconutitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/coconut.png");
- // fertilizer.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/fertilizer.png");
- // coral.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/testcoral.png");
- // chunkhammer.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/chunkhammer.png");
- // chunkwedge.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/chunkwedge.png");
- // tikiitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/tikiitem.png");
- // tikitopitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/tikitop.png");
- // tikibaseitem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/tikipole.png");
- // chair.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/chairitem.png");
- // umbrella.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/umbrellaitem.png");
- // bambooFence.blockIndexInTexture= mod_palmLeaves.bambooBl.blockIndexInTexture;
- headBblock.blockIndexInTexture= ModLoader.addOverride("/terrain.png", "/tropicalmod/chunkohead.png");
- thatchBl.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/thatch.png");
- bambooBl.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/bambooplanks.png");
- thatchDsl.blockIndexInTexture = thatchBl.blockIndexInTexture;
- bambooDsl.blockIndexInTexture = bambooBl.blockIndexInTexture;
- // tikitop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/tikitop.png");
- // tikibase.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/tikipole.png");
- pineappleCube.iconIndex = ModLoader.addOverride("/gui/items.png", "/tropicalmod/pineapplecubes.png");
- // bambooChest.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tropicalmod/bambooplanks.png");
- }
- public static void registerBlocks()
- {
- ModLoader.RegisterBlock(thatchBl);
- ModLoader.RegisterBlock(headBblock);
- ModLoader.RegisterBlock(bambooBl);
- ModLoader.RegisterBlock(thatchSt);
- ModLoader.RegisterBlock(bambooSt);
- ModLoader.RegisterBlock(thatchSl);
- ModLoader.RegisterBlock(bambooSl);
- ModLoader.RegisterBlock(thatchDsl);
- ModLoader.RegisterBlock(bambooDsl);
- ModLoader.RegisterBlock(palmLeaves);
- ModLoader.RegisterBlock(palmWood);
- ModLoader.RegisterBlock(coconut);
- ModLoader.RegisterBlock(purifiedSand);
- ModLoader.RegisterBlock(flower1);
- ModLoader.RegisterBlock(flower2);
- ModLoader.RegisterBlock(flower3);
- ModLoader.RegisterBlock(palmSapling);
- ModLoader.RegisterBlock(iristop);
- ModLoader.RegisterBlock(irisbase);
- ModLoader.RegisterBlock(pineappletop);
- ModLoader.RegisterBlock(pineapplebase);
- ModLoader.RegisterBlock(bamboo);
- // ModLoader.RegisterBlock(coral);
- // ModLoader.RegisterBlock(bambooFence);
- // ModLoader.RegisterBlock(tikitop);
- // ModLoader.RegisterBlock(tikibase);
- // ModLoader.RegisterBlock(bambooChest);
- }
- public static void addNames()
- {
- // ModLoader.AddName(chair, "Beach Chair");
- // ModLoader.AddName(umbrella, "Beach Umbrella");
- // ModLoader.AddName(bambooFence, "Bamboo Fence");
- ModLoader.AddName(headBblock, "Chunk O' Head");
- // ModLoader.AddName(fertilizer, "Fertilizer");
- ModLoader.AddName(thatchBl, "Thatch Block");
- ModLoader.AddName(bambooBl, "Bamboo Planks");
- ModLoader.AddName(thatchSt, "Thatch Stairs");
- ModLoader.AddName(bambooSt, "Bamboo Stairs");
- ModLoader.AddName(thatchSl, "Thatch Slab");
- ModLoader.AddName(bambooSl, "Bamboo Slab");
- ModLoader.AddName(thatchDsl, "Double Thatch Flat");
- ModLoader.AddName(thatchDsl, "Double Bamboo Flat");
- ModLoader.AddName(bamboo, "Bamboo");
- ModLoader.AddName(bambooitem, "Bamboo");
- ModLoader.AddName(palmSapling, "Palm Sapling");
- ModLoader.AddName(palmLeaves, "Palm Leaves");
- ModLoader.AddName(palmWood, "Palm Wood");
- ModLoader.AddName(coconut, "Coconut");
- ModLoader.AddName(Scaleboots, "Scale Boots");
- ModLoader.AddName(Scalehelm, "Scale Helmet");
- ModLoader.AddName(Scaleleggings, "Scale Leggings");
- ModLoader.AddName(Scalechestplate, "Scale Chestplate");
- ModLoader.AddName(Scale, "Scale");
- ModLoader.AddName(shellCommon1, "Solonox Shell");
- ModLoader.AddName(shellCommon2, "Frox Conch");
- ModLoader.AddName(shellCommon3, "Pab Shell");
- ModLoader.AddName(shellRare1, "Rube Nautilus");
- ModLoader.AddName(shellStarfish, "Starfish Shell");
- ModLoader.AddName(purifiedSand, "Purified Sand");
- ModLoader.AddName(flower1, "Commelina Diffusa");
- ModLoader.AddName(flower2, "Crocosmia");
- ModLoader.AddName(flower1item, "Commelina Diffusa");
- ModLoader.AddName(flower2item, "Crocosmia");
- ModLoader.AddName(flower3item, "Orchid");
- ModLoader.AddName(palmSaplingitem, "Palm Sapling");
- ModLoader.AddName(coconutChunk, "Coconut Chunk");
- ModLoader.AddName(iristop, "Iris Flower");
- ModLoader.AddName(irisbase, "Iris Stem");
- ModLoader.AddName(irisitem, "Iris");
- ModLoader.AddName(pineappletop, "Pineapple Flower");
- ModLoader.AddName(pineapplebase, "Pineapple Stem");
- ModLoader.AddName(pineappleitem, "Pineapple");
- ModLoader.AddName(bamboomugempty, "Empty Bamboo Mug");
- ModLoader.AddName(bamboomugfull, "Pina Colada");
- ModLoader.AddName(frogleg, "Frog Leg");
- ModLoader.AddName(froglegcooked, "Cooked Frog Leg");
- ModLoader.AddName(poisonskin, "Poison frog skin");
- ModLoader.AddName(coconutitem, "Coconut");
- // ModLoader.AddName(coral, "Coral");
- // ModLoader.AddName(chunkhammer, "Chunk O' Hammer");
- // ModLoader.AddName(chunkwedge, "Chunk O' Wedge");
- // ModLoader.AddName(tikitop, "Tiki torch top");
- // ModLoader.AddName(tikitopitem, "Tiki top");
- // ModLoader.AddName(tikibase, "Tiki torch base");
- // ModLoader.AddName(tikibaseitem, "Tiki pole");
- // ModLoader.AddName(tikiitem, "Tiki torch pole");
- ModLoader.AddName(pineappleCube, "Pineapple Cubes");
- // ModLoader.AddName(bambooChest, "Bamboo chest");
- }
- public static void addModRecipes()
- {
- // ModLoader.AddRecipe(new ItemStack(bambooFence, 2), new Object[] {
- // "XXX", "XXX", Character.valueOf('X'), Item.reed
- // });
- /* ModLoader.AddRecipe(new ItemStack(chair, 1), new Object[] {
- "XXX", "XIX", "XXX", Character.valueOf('X'), Item.reed, Character.valueOf('I'), Block.cloth});
- ModLoader.AddRecipe(new ItemStack(umbrella, 64), new Object[]{
- "XXX"," I ", " I ", Character.valueOf('X'), Block.cloth, Character.valueOf('I'), Item.reed
- }); */
- // ModLoader.AddRecipe(new ItemStack(beachFloat, 64), new Object[]{
- // "XXX", "III", Character.valueOf('X'), Block.cloth, Character.valueOf('I'), Item.reed
- // });
- // ModLoader.AddRecipe(new ItemStack(fertilizer, 2), new Object[] {
- // "XY", Character.valueOf('X'), flower1item, Character.valueOf('Y'), flower3item
- // });
- ModLoader.AddRecipe(new ItemStack(thatchBl, 1), new Object[] {
- "XX", "XX", Character.valueOf('X'), Item.reed
- });
- ModLoader.AddRecipe(new ItemStack(bambooBl, 1), new Object[] {
- "XX", "XX", Character.valueOf('X'), bambooitem
- });
- ModLoader.AddRecipe(new ItemStack(thatchSt, 1), new Object[] {
- "X ", "XX", Character.valueOf('X'), Item.reed
- });
- ModLoader.AddRecipe(new ItemStack(thatchSt, 4), new Object[] {
- "X ", "XX", Character.valueOf('X'), mod_tropicraft.thatchBl
- });
- ModLoader.AddRecipe(new ItemStack(bambooSt, 1), new Object[] {
- "X ", "XX", Character.valueOf('X'), bambooitem
- });
- ModLoader.AddRecipe(new ItemStack(bambooSt, 4), new Object[] {
- "X ", "XX", Character.valueOf('X'), mod_tropicraft.bambooBl
- });
- ModLoader.AddRecipe(new ItemStack(thatchSl, 1), new Object[] {
- "XX", Character.valueOf('X'), Item.reed
- });
- ModLoader.AddRecipe(new ItemStack(thatchSl, 2), new Object[] {
- "X", Character.valueOf('X'), mod_tropicraft.thatchBl
- });
- ModLoader.AddRecipe(new ItemStack(bambooSl, 1), new Object[] {
- "XX", Character.valueOf('X'), bambooitem
- });
- ModLoader.AddRecipe(new ItemStack(bambooSl, 2), new Object[] {
- "X", Character.valueOf('X'), mod_tropicraft.bambooBl
- });
- ModLoader.AddRecipe(new ItemStack(Block.planks, 4), new Object[] {
- "#", Character.valueOf('#'), palmWood
- });
- ModLoader.AddRecipe(new ItemStack(bamboomugempty, 1), new Object[] {
- "X X", "X X", "XXX", Character.valueOf('X'), bambooitem
- });
- ModLoader.AddRecipe(new ItemStack(bamboomugfull, 1), new Object[] {
- " X ", " Y ", " Z ", Character.valueOf('X'), coconutChunk, Character.valueOf('Y'), pineappleitem, Character.valueOf('Z'), bamboomugempty
- });
- ModLoader.AddRecipe(new ItemStack(bamboomugfull, 1), new Object[] {
- " Y ", " X ", " Z ", Character.valueOf('X'), coconutChunk, Character.valueOf('Y'), pineappleitem, Character.valueOf('Z'), bamboomugempty
- });
- ModLoader.AddRecipe(new ItemStack(Scalehelm, 1), new Object[] {
- "XXX", "X X", Character.valueOf('X'), Scale
- });
- ModLoader.AddRecipe(new ItemStack(Scalechestplate, 1), new Object[] {
- "X X", "XXX", "XXX", Character.valueOf('X'), Scale
- });
- ModLoader.AddRecipe(new ItemStack(Scaleleggings, 1), new Object[] {
- "XXX", "X X", "X X", Character.valueOf('X'), Scale
- });
- ModLoader.AddRecipe(new ItemStack(Scaleboots, 1), new Object[] {
- "X X", "X X", Character.valueOf('X'), Scale
- });
- // ModLoader.AddRecipe(new ItemStack(tikiitem, 2), new Object[] {
- // "Y","X","X", Character.valueOf('X'), tikibaseitem, Character.valueOf('Y'), tikitopitem
- // });
- }
- public static void setVals()
- {
- burnable = false;
- isPoisoned = false;
- timer = System.currentTimeMillis() + 20000;
- hitcounter = 0;
- isonfloat = false;
- air = 0;
- // entityrenderertropics = new EntityRendererTropics(ModLoader.getMinecraftInstance());
- mobnames = new ArrayList<String>();
- classnames = new ArrayList<Class>();
- spawnrates = new ArrayList<Integer>();
- creaturetypes = new ArrayList<EnumCreatureType>();
- othermobnames = new ArrayList<String>();
- otherclassnames = new ArrayList<Class>();
- // tropicswatermaterial = (new MaterialLiquid(MapColor.waterColor)).setNoPushMobility();
- poisonredfrograrity = 5;
- poisonyellowfrograrity = 5;
- poisonbluefrograrity = 5;
- treefrograrity = 8;
- MOWrarity = 40;
- EIHrarity = 11;
- iggyrarity = 15;
- starfishrarity = 19;
- // monkeyrarity = 12;
- }
- /* public void KeyboardEvent(KeyBinding keybinding)
- {
- if(keybinding.keyDescription.equals("CojoMakesWeather"))
- {
- int category;
- category = rand.nextInt(4) + 1;
- generateStorm("tropicalstorm", category, 0);
- System.out.println("I MAKE IT RAIN ON DEM HOES " + "CATEGORY: " + category);
- }
- else
- if(keybinding.keyDescription.equals("CojoMakesWeatherStop"))
- {
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(false);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(false);
- System.out.println("Storm halted");
- }
- else
- if(keybinding.keyDescription.equals("spawnmow"))
- {
- EntityPoisonousTreeFrogBlue entityliving = (EntityPoisonousTreeFrogBlue)EntityList.createEntityInWorld("Poisonous Blue Tree Frog", ModLoader.getMinecraftInstance().theWorld);
- ModLoader.getMinecraftInstance().theWorld.entityJoinedWorld(new EntityPoisonousTreeFrogBlue(ModLoader.getMinecraftInstance().theWorld));
- double d6 = (double)ModLoader.getMinecraftInstance().thePlayer.posX + (ModLoader.getMinecraftInstance().theWorld.rand.nextDouble() - ModLoader.getMinecraftInstance().theWorld.rand.nextDouble()) * 4D;
- double d7 = (ModLoader.getMinecraftInstance().thePlayer.posY + ModLoader.getMinecraftInstance().theWorld.rand.nextInt(3)) - 1;
- double d8 = (double)ModLoader.getMinecraftInstance().thePlayer.posZ + (ModLoader.getMinecraftInstance().theWorld.rand.nextDouble() - ModLoader.getMinecraftInstance().theWorld.rand.nextDouble()) * 4D;
- entityliving.setLocationAndAngles(d6, d7, d8, ModLoader.getMinecraftInstance().theWorld.rand.nextFloat() * 360F, 0.0F);
- ModLoader.getMinecraftInstance().theWorld.entityJoinedWorld(entityliving);
- }
- }*/
- public void AddRenderer(Map map)
- {
- // map.put(net.minecraft.src.EntityManOfWar.class, new RenderMOW(new ModelMOW(), 0.25F));
- map.put(net.minecraft.src.EntityIguana.class, new RenderIguana(new ModelIguana(), 0.5F));
- map.put(net.minecraft.src.EntityStarfish.class, new RenderStarfish(new ModelStarfish(), 0.5F));
- map.put(net.minecraft.src.EntityTreeFrog.class, new RenderTreeFrog(new ModelTreeFrog(), 0.5F));
- map.put(net.minecraft.src.EntityPoisonousTreeFrogRed.class, new RenderRedTreeFrog(new ModelTreeFrog(), 0.5F));
- map.put(net.minecraft.src.EntityPoisonousTreeFrogBlue.class, new RenderBlueTreeFrog(new ModelTreeFrog(), 0.5F));
- map.put(net.minecraft.src.EntityPoisonousTreeFrogYellow.class, new RenderYellowTreeFrog(new ModelTreeFrog(), 0.5F));
- map.put(net.minecraft.src.EntityPoisonBlot.class, new RenderPoisonBlot());
- map.put(EntityEIH.class, new RenderEIH(new ModelEIH(), 1.0F));
- // map.put(EntityChair.class, new RenderChair());
- // map.put(EntityUmbrella.class, new RenderUmbrella());
- // map.put(EntityBeachFloat.class, new RenderBeachFloat() );
- }
- public void GenerateSurface(World world, Random random, int i, int j)
- {
- int k = i + 8;
- int l = random.nextInt(62) + 64;
- int i1 = j + 8;
- (new WorldGenFlowers2(flower1.blockID)).generate(world, random, k, l, i1);
- int j1 = j + 2;
- (new WorldGenFlowers2(flower3.blockID)).generate(world, random, k, l, j1);
- int k1 = i + 8;
- int l1 = random.nextInt(62) + 64;
- int i2 = j + 8;
- (new WorldGenFlowers2(flower2.blockID)).generate(world, random, k1, l1, i2);
- int j2 = i + 8;
- int k2 = random.nextInt(62) + 64;
- int l2 = j + 8;
- (new WorldGenIris(irisbase.blockID)).generate(world, random, j2, k2, l2);
- int i3 = random.nextInt(62) + 64;
- (new WorldGenPineapple(pineapplebase.blockID)).generate(world, random, j2, i3, l2);
- int j4 = i + 8;
- int k4 = random.nextInt(62) + 64;
- int l4 = j + 8;
- (new WorldGenBamboo()).generate(world, random, j4, k4, l4);
- int xvar = i + 8;
- int yvar = random.nextInt(62) + 64;
- int zvar = j + 8;
- if(random.nextInt(27) == 0)
- (new WorldGenEIH()).generate(world, random, xvar, yvar, zvar);
- for(int j3 = 0; j3 < 38; j3++)
- {
- int k3 = i + 8;
- int l3 = random.nextInt(62) + 64;
- int i4 = j + 8;
- if(random.nextInt(5) == 0)
- (new WorldGenLargeCojoPalmTrees()).generate(world, random, k3, l3, i4);
- else
- if(random.nextInt(5) == 1 || random.nextInt(5) == 2)
- (new WorldGenTropicraftCurvedPalm()).generate(world, random, k3, l3, i4);
- else
- (new WorldGenCojoPalmTrees()).generate(world, random, k3, l3, i4);
- }
- }
- public boolean OnTickInGame(Minecraft minecraft)
- {
- World cojoworld = ModLoader.getMinecraftInstance().theWorld;
- EntityPlayerSP thePlayer = ModLoader.getMinecraftInstance().thePlayer;
- /* if(thePlayer.inventory.getCurrentItem() != null && thePlayer.inventory.getCurrentItem().itemID == chunkhammer.shiftedIndex)
- {
- if(minecraft.objectMouseOver == null)
- {
- }else
- if(minecraft.objectMouseOver.typeOfHit == EnumMovingObjectType.TILE)
- if(Mouse.getEventButton() == 0 && Mouse.getEventButtonState()){
- int i = minecraft.objectMouseOver.blockX;
- int j = minecraft.objectMouseOver.blockY;
- int k = minecraft.objectMouseOver.blockZ;
- int i1 = minecraft.objectMouseOver.sideHit;
- int i2 = cojoworld.getBlockId(i, j, k);
- int j1 = cojoworld.getBlockId(i, j + 1, k);
- if(i2 != 0 && (i1 != Block.bedrock.blockID && i1 != Block.obsidian.blockID && i1 != Block.waterMoving.blockID && i1 != Block.waterStill.blockID&& i1 != Block.lavaMoving.blockID && i1 != Block.lavaStill.blockID))
- {
- Block block = Block.stone;
- cojoworld.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, block.stepSound.stepSoundDir(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
- minecraft.playerController.clickBlock(i, j, k, 0);
- ItemStack itemstack1 = thePlayer.inventory.getCurrentItem();
- ModLoader.getMinecraftInstance().effectRenderer.addBlockDestroyEffects((int)i, (int)j, (int)k, cojoworld.getBlockId(i,j,k), 0);
- cojoworld.setBlockWithNotify(i, j, k, 0);
- itemstack1.damageItem(1, thePlayer); //this is what makes the hammer NOT INVINCIBLELOLOLOLOL
- }
- }
- }else
- if(thePlayer.inventory.getCurrentItem() != null && thePlayer.inventory.getCurrentItem().itemID == chunkwedge.shiftedIndex)
- {
- if(minecraft.objectMouseOver == null)
- {
- }
- else
- {
- if(Mouse.getEventButton() == 0 && Mouse.getEventButtonState()){
- int i = minecraft.objectMouseOver.blockX;
- int j = minecraft.objectMouseOver.blockY;
- int k = minecraft.objectMouseOver.blockZ;
- int i1 = minecraft.objectMouseOver.sideHit;
- int i2 = cojoworld.getBlockId(i, j, k);
- int j1 = cojoworld.getBlockId(i, j + 1, k);
- if(i2 != 0 && (i1 != Block.bedrock.blockID && i1 != Block.obsidian.blockID && i1 != Block.waterMoving.blockID && i1 != Block.waterStill.blockID&& i1 != Block.lavaMoving.blockID && i1 != Block.lavaStill.blockID))
- {
- Block block = Block.stone;
- cojoworld.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, block.stepSound.stepSoundDir(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
- minecraft.playerController.clickBlock(i, j, k, i2);
- ItemStack itemstack1 = thePlayer.inventory.getCurrentItem();
- // ModLoader.getMinecraftInstance().effectRenderer.addBlockDestroyEffects((int)i, (int)j, (int)k, cojoworld.getBlockId(i,j,k), 0);
- // cojoworld.setBlockWithNotify(i, j, k, 0);
- if(j1 == 0)
- cojoworld.setBlockWithNotify(i,j,k,0);
- else
- System.out.print("don't destroy it");
- itemstack1.damageItem(1, thePlayer); //this is what makes the hammer NOT INVINCIBLELOLOLOLOL
- }
- }
- }
- }
- if(cojoworld.worldInfo.getIsRaining())
- {
- if(thePlayer.inventory.getCurrentItem() != null && thePlayer.inventory.getCurrentItem().itemID == bamboomugfull.shiftedIndex){
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 10F;
- ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(raindrink);
- System.out.println("raindrink achievement achieved");
- }
- if(minecraft.thePlayer.isCollidedHorizontally)
- {
- thePlayer.motionX += windspeed;
- }else
- thePlayer.motionX += windspeed;
- }
- */
- if(cojoworld.worldInfo.getIsRaining())
- {
- if(thePlayer.inventory.getCurrentItem() != null && thePlayer.inventory.getCurrentItem().itemID == bamboomugfull.shiftedIndex)
- {
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 10F;
- ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(raindrink);
- System.out.println("raindrink achievement achieved");
- }
- }
- ItemStack itemstack = minecraft.thePlayer.inventory.armorInventory[0];
- ItemStack itemstack1 = minecraft.thePlayer.inventory.armorInventory[1];
- ItemStack itemstack2 = minecraft.thePlayer.inventory.armorInventory[2];
- ItemStack itemstack3 = minecraft.thePlayer.inventory.armorInventory[3];
- if(itemstack != null && itemstack1 != null && itemstack2 != null && itemstack3 != null)
- {
- if(itemstack.itemID == Scaleboots.shiftedIndex && itemstack1.itemID == Scaleleggings.shiftedIndex && itemstack2.itemID == Scalechestplate.shiftedIndex && itemstack3.itemID == Scalehelm.shiftedIndex)
- {
- burnable = false;
- minecraft.thePlayer.isImmuneToFire = !burnable;
- } else
- burnable = true;
- minecraft.thePlayer.isImmuneToFire = !burnable;
- }
- else
- burnable = true;
- minecraft.thePlayer.isImmuneToFire = !burnable;
- //this code lets me just use leggings for anti fire
- /*itemstack2 = minecraft.thePlayer.inventory.armorInventory[1];
- if (itemstack2 != null && itemstack2.itemID == Scaleleggings.shiftedIndex) {
- burnable = false;
- minecraft.thePlayer.isImmuneToFire = !burnable;
- } else {
- burnable = true;
- minecraft.thePlayer.isImmuneToFire = !burnable;
- }*/
- if((itemstack != null || itemstack1 != null || itemstack2 != null || itemstack3 != null))
- {
- if((minecraft.thePlayer.isInsideOfMaterial(Material.fire) || minecraft.thePlayer.isBurning()) && count-- <= 0)
- {
- minecraft.thePlayer.inventory.damageArmor(1);
- count = 30;
- }
- else
- {
- count = 0;
- }
- }
- /*if(burnable)
- minecraft.thePlayer.isImmuneToFire = false;
- else
- if(!burnable)
- minecraft.thePlayer.isImmuneToFire = true;*/
- return true;
- }
- public String Version()
- {
- return "2.4";
- }
- public static void addAchievements()
- {
- raindrink = (new Achievement(53, "raindrink",-2,-6,bamboomugfull,null)).registerAchievement();
- ModLoader.AddAchievementDesc(raindrink, "If you like pina coladas", "And getting caught in the rain...");
- }
- //Step sounds, add as needed//
- public static final StepSound soundSandFootstep = new StepSoundSand("sand", 1.0F, 1.0F);
- public static final StepSound soundGrassFootstep = new StepSound("grass", 1.0F, 1.0F);
- public static final StepSound soundWoodFootstep = new StepSound("wood", 1.0F, 1.0F);
- //Blocks//
- public static final Block headBblock = new BlockHeadb(221,0).setHardness(2.0f).setResistance(30.0F).setBlockName("headBblock");
- public static final Block thatchBl = new BlockThatchBl(222, 0).setHardness(0.1F).setResistance(0.1F).setBlockName("thatchBl");
- public static final Block thatchSt = new BlockThatchSt(223, 0).setHardness(0.1F).setResistance(0.1F).setBlockName("thatchSt");
- public static final Block thatchSl = new BlockThatchSl(224,false).setHardness(0.1F).setResistance(0.1F).setBlockName("thatchSl");
- public static final Block thatchDsl = new BlockThatchDsl(225, 0).setHardness(0.1F).setResistance(0.1F).setBlockName("thatchDsl");
- public static final Block bambooBl = new BlockBambooBl(226,0).setHardness(1.0F).setResistance(0.1F).setBlockName("bambooBl");
- public static final Block bambooSt = new BlockBambooSt(227,0).setHardness(1.0F).setResistance(0.1F).setBlockName("bambooSt");
- public static final Block bambooSl = new BlockBambooSl(228,false).setHardness(1.0F).setResistance(0.1F).setBlockName("bambooSl");
- public static final Block bambooDsl = new BlockBambooDsl(229, 0).setHardness(1.0F).setResistance(0.1F).setBlockName("bambooDsl");
- // public static final Block bambooFence = new BlockBambooFence(230,0).setHardness(.6F).setResistance(0.6F).setBlockName("bambooFence");
- public static final Block bamboo = (new BlockBamboo(231, 73)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Bamboo").disableStats();
- public static final BlockCojoPalmLeaves palmLeaves = (BlockCojoPalmLeaves)(new BlockCojoPalmLeaves(232, 0)).setHardness(0.2F).setStepSound(soundGrassFootstep).setLightOpacity(1).setBlockName("Palm Leaves").disableStats().setRequiresSelfNotify();
- public static final Block palmWood = (new BlockCojoPalmWood(233, 0)).setHardness(2.0F).setBlockName("Palm Wood").setStepSound(soundWoodFootstep).setRequiresSelfNotify();
- public static final Block coconut = (new BlockCoconut(234, 0)).setHardness(0.4F).setBlockName("Coconut");
- public static final Block purifiedSand = (new BlockSand(235, 0)).setHardness(0.5F).setStepSound(soundSandFootstep).setBlockName("Purified Sand");
- public static final Block palmSapling = (BlockCojoPalmSapling)(new BlockCojoPalmSapling(253, 0)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Palm Sapling");
- public static final BlockFlower2 flower1 = (BlockFlower2)(new BlockFlower2(188, 0)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Commelina Diffusa");
- public static final BlockFlower3 flower2 = (BlockFlower3)(new BlockFlower3(189, 1)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Crocosmia");
- public static final BlockFlower4 flower3 = (BlockFlower4)(new BlockFlower4(191, 2)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Orchid");
- public static final BlockFlowerIris iristop = (BlockFlowerIris)(new BlockFlowerIris(192, 3)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Iris");
- public static final BlockFlowerIrisBase irisbase = (BlockFlowerIrisBase)(new BlockFlowerIrisBase(193, 4)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Iris stem");
- public static final BlockFlowerPineapple pineappletop = (BlockFlowerPineapple)(new BlockFlowerPineapple(194, 3)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Pineapple");
- public static final BlockFlowerPineappleBase pineapplebase = (BlockFlowerPineappleBase)(new BlockFlowerPineappleBase(195, 4)).setHardness(0.0F).setStepSound(soundGrassFootstep).setBlockName("Pineapple stem");
- // public static final BlockTikiTop tikitop = (BlockTikiTop)(new BlockTikiTop(236,0)).setBlockName("Tiki torch top");
- // public static final BlockTikiBase tikibase = (BlockTikiBase)(new BlockTikiBase(237,0)).setBlockName("Tiki torch base");
- // public static final BlockBambooChest bambooChest = (BlockBambooChest)(new BlockBambooChest(238,0)).setHardness(3.0f).setStepSound(soundWoodFootstep).setBlockName("Bamboo Chest").setRequiresSelfNotify();
- // public static final BlockCojoCoral coral = (BlockCojoCoral)(new BlockCojoCoral(215, 215)).setHardness(1.0F).setLightValue(0.0F).setStepSound(Block.soundWoodFootstep).setBlockName("coralBlock");
- // public static final Block tropicswaterMoving = (new BlockFlowing(222, Material.water)).setHardness(100F).setLightOpacity(3).setBlockName("water").disableStats().disableNeighborNotifyOnMetadataChange();
- // public static final Block tropicswaterStill = (new BlockStationary(223, Material.water)).setHardness(100F).setLightOpacity(3).setBlockName("water").disableStats().disableNeighborNotifyOnMetadataChange();
- //Items//
- // public static final ItemCojoCoral coralItem = (ItemCojoCoral)(new ItemCojoCoral(215 - 256)).setItemName("coralItem");
- // public static final Item chair = new ItemChair(2002).setItemName("chair");
- // public static final Item umbrella = new ItemUmbrella(2003).setItemName("umbrella");
- // public static final Item beachFloat = new ItemBeachFloat(2004).setItemName("beachFloat");
- public static Item irisitem = (new ItemIris(14258, irisbase)).setItemName("Iris");
- public static Item pineappleitem = (new ItemPineapple(14259, pineapplebase)).setItemName("Pineapple");
- public static Item bamboomugempty = (new Item(14260)).setItemName("Empty Bamboo Mug");
- public static Item bamboomugfull = (new ItemPinaColada(14261, 6)).setItemName("Pi\361a Colada");
- public static Item frogleg = (new Item(14262)).setItemName("Frog Leg");
- public static Item froglegcooked = (new ItemFood(14263, 3, false)).setItemName("Cooked Frog Leg");
- public static Item poisonskin = (new Item(14264)).setItemName("Poison Skin");
- public static Item bambooitem = (new ItemBamboo(14265, bamboo)).setItemName("Bamboo");
- public static Item coconutitem = (new ItemCoconut(14266, coconut)).setItemName("Coconut");
- // public static ItemTropicalMeal fertilizer = (ItemTropicalMeal) (new ItemTropicalMeal(14267)).setItemName("Tropical Meal");
- public static Item Scale = (new Item(14268)).setItemName("Scale");
- public static Item Scaleboots = (new ItemArmor(14269, 2, ModLoader.AddArmor("scale"), 3)).setItemName("Scale Boots");
- public static Item Scalehelm = (new ItemArmor(14270, 2, ModLoader.AddArmor("scale"), 0)).setItemName("Scale Helm");
- public static Item Scaleleggings = (new ItemArmor(14271, 2, ModLoader.AddArmor("scale"), 2)).setItemName("Scale Leggings");
- public static Item Scalechestplate = (new ItemArmor(14272, 2, ModLoader.AddArmor("scale"), 1)).setItemName("Scale Chestplate");
- public static Item shellCommon1 = (new Item(14273)).setItemName("Solonox Shell");
- public static Item shellCommon2 = (new Item(14274)).setItemName("Frox Conch");
- public static Item shellCommon3 = (new Item(14275)).setItemName("Pab Shell");
- public static Item shellRare1 = (new Item(14276)).setItemName("Rube Nautilus");
- public static Item shellStarfish = (new Item(14277)).setItemName("Starfish Shell");
- public static Item flower1item = (new ItemTropicalFlowers(14278, flower1)).setItemName("Commelina Diffusa");
- public static Item flower2item = (new ItemTropicalFlowers(14279, flower2)).setItemName("Crocosmia");
- public static Item flower3item = (new ItemTropicalFlowers(14280, flower3)).setItemName("Orchid");
- public static Item palmSaplingitem = (new ItemCojoPalmSapling(14281, palmSapling)).setItemName("Palm Sapling");
- public static Item coconutChunk = (new ItemFood(14282, 1, 0.1F, false)).setItemName("coconut chunk");
- // public static Item tikitopitem = (new ItemTikiTop(14286, tikitop)).setItemName("Tiki pole top");
- // public static Item tikibaseitem = (new ItemTikiBase(14287, tikibase)).setItemName("Tiki pole bottom");
- // public static Item tikiitem = (new ItemTikiItem(14285, tikitop)).setItemName("Tiki pole");
- // public static final Item chunkhammer = (new ItemChunkHammer(14283, EnumToolMaterialTropics.CHUNKOHEAD)).setItemName("Chunk hammer");
- // public static final Item chunkwedge = (new ItemChunkWedge(14284, EnumToolMaterialTropics.CHUNKOHEAD)).setItemName("Chunk Wedge");
- public static Item pineappleCube = (new ItemFood(23000, 1, 0.1F, false)).setItemName("Pineapple Cubes");
- //Material//
- // public static Material tropicswatermaterial;// = (new MaterialLiquid(MapColor.waterColor)).setNoPushMobility();
- //Achievements//
- private static Achievement raindrink;
- //ints, booleans, longs, randoms, etc//
- public static int hitcounter;
- public static int palmWoodBottom;
- public static int air;
- public static int temphealth;
- public static boolean burnable;
- public static boolean isPoisoned;
- public static long timer;
- public static Random rand = new Random();
- public static boolean isonfloat;
- public static double windspeed = 0.0D;
- public static int count = 0;
- public static boolean isUserPoisoned() {
- // System.out.println("user be poisoned");
- return isPoisoned;
- }
- public static void setUserPoisoned(boolean foo)
- {
- System.out.println("user set poisoned");
- isPoisoned = foo;
- }
- /* public void generateStorm(String stormname, int category, int duration)
- {
- if(stormname.equals("tropicalstorm"))
- {
- switch(category)
- {
- case 1:
- windspeed = 0.0D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 2F;
- ModLoader.getMinecraftInstance().theWorld.rainingStrength = 2F;
- break;
- case 2:
- windspeed = 0.0D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 4F;
- ModLoader.getMinecraftInstance().theWorld.rainingStrength = 4F;
- break;
- case 3:
- windspeed = 0.11837D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 6F;
- ModLoader.getMinecraftInstance().theWorld.rainingStrength = 6F;
- break;
- case 4:
- windspeed = 0.1532480D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 8F;
- ModLoader.getMinecraftInstance().theWorld.rainingStrength = 8F;
- break;
- case 5:
- windspeed = 0.1947504D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 10F;
- ModLoader.getMinecraftInstance().theWorld.rainingStrength = 10F;
- break;
- default:
- windspeed = 0.1D;
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsRaining(true);
- ModLoader.getMinecraftInstance().theWorld.worldInfo.setIsThundering(true);
- ModLoader.getMinecraftInstance().theWorld.thunderingStrength = 12F;
- }
- }
- // new EntityTropicalStorm(ModLoader.getMinecraftInstance().theWorld, 2D, 3D, 4D);
- }
- */
- public static void addEntityToModWithSpawn(Object entityclassname, String entityname, int spawnrate, Object enumcreaturetype)
- {
- ModLoader.RegisterEntityID((Class)entityclassname, (String)entityname, ModLoader.getUniqueEntityId());
- if(entityclassname.equals(net.minecraft.src.EntityIguana.class))
- ModLoader.AddSpawn((Class)entityclassname, spawnrate,2,6, (EnumCreatureType)enumcreaturetype);
- else
- ModLoader.AddSpawn((Class)entityclassname, spawnrate, 1, 2, (EnumCreatureType)enumcreaturetype);
- }
- public static void addEntityToModWithoutSpawn(Class entityclassname, String entityname)
- {
- ModLoader.RegisterEntityID((Class)entityclassname, (String)entityname, ModLoader.getUniqueEntityId());
- }
- public static void addAllEntities()
- {
- createEntityList();
- int mobiterator = mobnames.size();
- int i = 0;
- while(i < mobiterator)
- {
- addEntityToModWithSpawn(classnames.get(i), mobnames.get(i), ((Integer) spawnrates.get(i)).intValue(), creaturetypes.get(i));
- i++;
- }
- int other = othermobnames.size();
- i = 0;
- while(i < other)
- {
- addEntityToModWithoutSpawn(otherclassnames.get(i), othermobnames.get(i));
- i++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement