diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b168d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,221 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.class +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +/mcp/* +/eclipse/* +/api/* +/releases/* diff --git a/common/MysticOres/Blocks/BlockBase.java b/common/MysticOres/Blocks/BlockBase.java index 043b59b..45174a2 100644 --- a/common/MysticOres/Blocks/BlockBase.java +++ b/common/MysticOres/Blocks/BlockBase.java @@ -1,14 +1,14 @@ -package MysticOres.Blocks; +package mysticores.blocks; import java.util.List; import java.util.Random; +import mysticores.items.Items; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; @@ -16,223 +16,234 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import MysticOres.MysticOres; -import MysticOres.Items.Items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockBase extends Block -{ +public class BlockBase extends Block { Icon[] textures; - - public BlockBase(int ID) - { + + public BlockBase(int ID) { super(ID, Material.rock); - setCreativeTab(MysticOres.MysticOresTab); + setCreativeTab(mysticores.MysticOres.MysticOresTab); } - - + @Override - public float getBlockHardness(World world, int x, int y, int z) - { + public int damageDropped(int j) { + switch (j) { + case 1: + return 8; + case 2: + return 4; + case 4: + return 5; + case 5: + return 7; + case 7: + return 10; + case 8: + return 0; + case 9: + return 0; + case 10: + return 0; + case 11: + return 6; + case 12: + return 11; + default: + return j; + } + } + + @Override + public float getBlockHardness(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - if(meta == 12) + if (meta == 12) return 4.5f; else return 3.0f; } - + @Override - public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, - double explosionZ) - { + public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { int meta = world.getBlockMetadata(x, y, z); - if(meta == 12) + if (meta == 12) return 2000.0f; else return 2.0f; - } - + } + @Override - public int getLightValue(IBlockAccess world, int x, int y, int z) - { + @SideOnly(Side.CLIENT) + public Icon getIcon(int side, int meta) { + return textures[meta]; + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - if(meta == 2 || meta == 3) + if (meta == 2 || meta == 3) return 7; else return 0; } - + @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister register) - { - textures = new Icon[16]; - for(int i=0;i getResources(File file, Pattern pattern) - { + + private static Collection getResources(File file, Pattern pattern) { ArrayList retval = new ArrayList(); - if(file.isDirectory()) + if (file.isDirectory()) retval.addAll(getResourcesFromDirectory(file, pattern)); - else retval.addAll(getResourcesFromJarFile(file, pattern)); + else + retval.addAll(getResourcesFromJarFile(file, pattern)); return retval; } - - private static Collection getResourcesFromJarFile(File file, Pattern pattern) - { + + private static Collection getResourcesFromDirectory(File directory, Pattern pattern) { + ArrayList retval = new ArrayList(); + File[] FileList = directory.listFiles(); + for (File file : FileList) { + if (file.isDirectory()) { + retval.addAll(getResourcesFromDirectory(file, pattern)); + } else + try { + String fileName = file.getCanonicalPath().replace('\\', '/'); + boolean accept = pattern.matcher(fileName).matches(); + if (accept) + retval.add(fileName); + } catch (final IOException e) { + throw new Error(e); + } + } + return retval; + } + + private static Collection getResourcesFromJarFile(File file, Pattern pattern) { ArrayList retval = new ArrayList(); ZipFile Zip; - try - { + try { Zip = new ZipFile(file); - } - catch (ZipException Ex) - { + } catch (ZipException Ex) { throw new Error(Ex); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } Enumeration entries = Zip.entries(); - while (entries.hasMoreElements()) - { + while (entries.hasMoreElements()) { ZipEntry ZipE = entries.nextElement(); String FileName = ZipE.getName(); boolean accept = pattern.matcher(FileName).matches(); - if(accept) + if (accept) retval.add(FileName); } - try - { + try { Zip.close(); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } - return retval; - } - - private static Collection getResourcesFromDirectory(File directory, Pattern pattern) - { - ArrayList retval = new ArrayList(); - File[] FileList = directory.listFiles(); - for (File file : FileList) - { - if (file.isDirectory()) - { - retval.addAll(getResourcesFromDirectory(file, pattern)); - } - else try - { - String fileName = file.getCanonicalPath().replace('\\', '/'); - boolean accept = pattern.matcher(fileName).matches(); - if (accept) retval.add(fileName); - } - catch(final IOException e) - { - throw new Error(e); - } - } return retval; } } diff --git a/common/MysticOres/Util/OreDictManager.java b/common/MysticOres/Util/OreDictManager.java index d20ade7..e57d6dc 100644 --- a/common/MysticOres/Util/OreDictManager.java +++ b/common/MysticOres/Util/OreDictManager.java @@ -1,14 +1,12 @@ -package MysticOres.Util; +package mysticores.util; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Items.Items; +import mysticores.blocks.BlockHandler; +import mysticores.items.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -public class OreDictManager -{ - public static void Initialize() - { +public class OreDictManager { + public static void Initialize() { OreDictionary.registerOre("ingotAdamantine", new ItemStack(Items.Resource, 1, 2)); OreDictionary.registerOre("ingotMithril", new ItemStack(Items.Resource, 1, 1)); OreDictionary.registerOre("ingotVerdite", new ItemStack(Items.Resource, 1, 0)); @@ -18,7 +16,6 @@ public class OreDictManager OreDictionary.registerOre("gemTopaz", new ItemStack(Items.Resource, 1, 7)); OreDictionary.registerOre("gemAmethyst", new ItemStack(Items.Resource, 1, 8)); OreDictionary.registerOre("gemAgate", new ItemStack(Items.Resource, 1, 6)); - OreDictionary.registerOre("oreAdamantine", new ItemStack(BlockHandler.BlockBase, 1, 0)); OreDictionary.registerOre("oreAmethyst", new ItemStack(BlockHandler.BlockBase, 1, 1)); OreDictionary.registerOre("oreIridium", new ItemStack(BlockHandler.BlockBase, 1, 2)); diff --git a/common/MysticOres/Util/RecipeManager.java b/common/MysticOres/Util/RecipeManager.java index 27f99c7..9995728 100644 --- a/common/MysticOres/Util/RecipeManager.java +++ b/common/MysticOres/Util/RecipeManager.java @@ -1,201 +1,63 @@ -package MysticOres.Util; +package mysticores.util; +import mysticores.blocks.BlockHandler; +import mysticores.items.Items; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.oredict.ShapedOreRecipe; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Items.Items; import cpw.mods.fml.common.registry.GameRegistry; -public class RecipeManager -{ - public static void Initialize() - { +public class RecipeManager { + public static void Initialize() { Recipes(); ToolRecipes(); PowderRecipes(); Smelting(); } - - private static void Recipes() - { - GameRegistry.addRecipe(new ItemStack(Block.glass, 1), new Object [] { - "##", "##", '#', new ItemStack(Items.Resource, 1, 11) - }); - - GameRegistry.addRecipe(new ItemStack(Block.obsidian, 1), new Object[] { - "##", "##", '#', new ItemStack(Items.Resource, 1, 12) - }); - - GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), new Object[] { - "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), new ItemStack(Items.Resource, 1, 6) - }); - - GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), new Object[] { - "XXX", "XOX", "XXX", Character.valueOf('X'), new ItemStack(BlockHandler.BlockBase, 1, 3), Character.valueOf('O'), new ItemStack(Items.Resource, 1, 6) - }); - - GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), new Object[] { - "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), new ItemStack(Items.Resource, 1, 8) - }); - - GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), new Object[] { - "###", "#D#", "###", '#', new ItemStack(Items.Resource, 1, 11), 'D', new ItemStack(Items.Resource, 1, 12) - }); - - GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), new Object[] { - "##", "##", '#', new ItemStack(Items.Resource, 1, 10) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 7), new Object[] { - new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 7) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 3), new Object[] { - new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 3) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), new Object[] { - new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 0) - }); - GameRegistry.addRecipe(new ItemStack(Items.Resource, 2, 13), new Object[] { - "#", "#", '#', new ItemStack(Items.Resource, 1, 12) - }); - - GameRegistry.addRecipe(new ItemStack(Items.Resource, 1, 3), new Object[] { - "###", "#O#", "###", '#', new ItemStack(Items.Resource, 1, 4), 'O', new ItemStack(Items.Resource, 1, 2) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), new Object[] { - Block.glass - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), new Object[] { - Block.obsidian - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 8, 9), new Object[] { - new ItemStack(Items.Resource, 1, 5), new ItemStack(Items.Resource, 1, 7), new ItemStack(Items.Resource, 1, 8), new ItemStack(Items.Resource, 1, 6) - }); - } - - private static void ToolRecipes() - { - ToolRecipes.SwordRecipe(Items.VerditeSword, new ItemStack(Items.Resource, 1, 0)); - ToolRecipes.PickaxeRecipe(Items.VerditePickaxe, new ItemStack(Items.Resource, 1, 0)); - ToolRecipes.ShovelRecipe(Items.VerditeShovel, new ItemStack(Items.Resource, 1, 0)); - ToolRecipes.AxeRecipe(Items.VerditeAxe, new ItemStack(Items.Resource, 1, 0)); - ToolRecipes.HoeRecipe(Items.VerditeHoe, new ItemStack(Items.Resource, 1, 0)); - - ToolRecipes.SwordRecipe(Items.MithrilSword, new ItemStack(Items.Resource, 1, 1)); - ToolRecipes.PickaxeRecipe(Items.MithrilPickaxe, new ItemStack(Items.Resource, 1, 1)); - ToolRecipes.ShovelRecipe(Items.MithrilShovel, new ItemStack(Items.Resource, 1, 1)); - ToolRecipes.AxeRecipe(Items.MithrilAxe, new ItemStack(Items.Resource, 1, 1)); - ToolRecipes.HoeRecipe(Items.MithrilHoe, new ItemStack(Items.Resource, 1, 1)); - - ToolRecipes.AdvancedSwordRecipe(Items.AdamantineSword, new ItemStack(Items.Resource, 1, 2)); - ToolRecipes.AdvancedPickaxeRecipe(Items.AdamantinePickaxe, new ItemStack(Items.Resource, 1, 2)); - ToolRecipes.AdvancedShovelRecipe(Items.AdamantineShovel, new ItemStack(Items.Resource, 1, 2)); - ToolRecipes.AdvancedAxeRecipe(Items.AdamantineAxe, new ItemStack(Items.Resource, 1, 2)); - ToolRecipes.AdvancedHoeRecipe(Items.AdamantineHoe, new ItemStack(Items.Resource, 1, 2)); - - ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, new ItemStack(Items.Resource, 1, 3)); - - ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, new ItemStack(Items.Resource, 1, 3)); - ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, new ItemStack(Items.Resource, 1, 3)); - - ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Block.obsidian)); - ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Block.obsidian)); - ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Block.obsidian)); - ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Block.obsidian)); - ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Block.obsidian)); - - ToolRecipes.AdvancedSwordRecipe(Items.BloodstoneSword, new ItemStack(BlockHandler.BlockBase, 1, 7)); - ToolRecipes.AdvancedPickaxeRecipe(Items.BloodstonePickaxe, new ItemStack(BlockHandler.BlockBase, 1, 7)); - ToolRecipes.AdvancedShovelRecipe(Items.BloodstoneShovel, new ItemStack(BlockHandler.BlockBase, 1, 7)); - ToolRecipes.AdvancedAxeRecipe(Items.BloodstoneAxe, new ItemStack(BlockHandler.BlockBase, 1, 7)); - ToolRecipes.AdvancedHoeRecipe(Items.BloodstoneHoe, new ItemStack(BlockHandler.BlockBase, 1, 7)); - - GameRegistry.addRecipe(new ItemStack(Items.Satchel, 1), new Object[] { - "#$#", "$%$", "#$#", '#', Item.silk, '$', new ItemStack(Items.Resource, 1, 9), '%', Block.enderChest - }); + private static void PowderRecipes() { + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreGold }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreIron }); + GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 2, 10), new Object[] { new ItemStack(Items.Resource, 1, 9), new ItemStack(Items.Resource, 1, 10) }); + GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Item.gunpowder }); + GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 2, 4), new Object[] { new ItemStack(Items.Resource, 1, 9), new ItemStack(Items.Resource, 1, 4) }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreCoal, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreCoal }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 3), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreIron }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 3), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreGold }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreRedstone, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreRedstone }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreLapis, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreLapis }); + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreDiamond, 2), new Object[] { new ItemStack(Items.Resource, 1, 9), Block.oreDiamond }); + GameRegistry.addShapelessRecipe(new ItemStack(Item.sugar, 18), new Object[] { new ItemStack(Items.Resource, 1, 9), Item.sugar }); + GameRegistry.addShapelessRecipe(new ItemStack(Item.redstone, 12), new Object[] { new ItemStack(Items.Resource, 1, 9), Item.redstone }); + GameRegistry.addShapelessRecipe(new ItemStack(Item.glowstone, 6), new Object[] { new ItemStack(Items.Resource, 1, 9), Item.glowstone }); + GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 3), new Object[] { new ItemStack(Items.Resource, 1, 9), Item.gunpowder }); } - private static void PowderRecipes() - { - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreGold - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreIron - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 2, 10), new Object[] { - new ItemStack(Items.Resource, 1, 9), new ItemStack(Items.Resource, 1, 10) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Item.gunpowder - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 2, 4), new Object[] { - new ItemStack(Items.Resource, 1, 9), new ItemStack(Items.Resource, 1, 4) - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreCoal, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreCoal - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 3), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreIron - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 3), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreGold - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreRedstone, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreRedstone - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreLapis, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreLapis - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Block.oreDiamond, 2), new Object[] { - new ItemStack(Items.Resource, 1, 9), Block.oreDiamond - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Item.sugar, 18), new Object[] { - new ItemStack(Items.Resource, 1, 9), Item.sugar - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Item.redstone, 12), new Object[] { - new ItemStack(Items.Resource, 1, 9), Item.redstone - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Item.glowstone, 6), new Object[] { - new ItemStack(Items.Resource, 1, 9), Item.glowstone - }); - - GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 3), new Object[] { - new ItemStack(Items.Resource, 1, 9), Item.gunpowder - }); + private static void Recipes() { + GameRegistry.addRecipe(new ItemStack(Block.glass, 1), new Object[] { "##", "##", '#', new ItemStack(Items.Resource, 1, 11) }); + GameRegistry.addRecipe(new ItemStack(Block.obsidian, 1), new Object[] { "##", "##", '#', new ItemStack(Items.Resource, 1, 12) }); + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), new Object[] { "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), + new ItemStack(Items.Resource, 1, 6) }); + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), + new Object[] { "XXX", "XOX", "XXX", Character.valueOf('X'), new ItemStack(BlockHandler.BlockBase, 1, 3), Character.valueOf('O'), new ItemStack(Items.Resource, 1, 6) }); + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), new Object[] { "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), + new ItemStack(Items.Resource, 1, 8) }); + GameRegistry + .addRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), new Object[] { "###", "#D#", "###", '#', new ItemStack(Items.Resource, 1, 11), 'D', new ItemStack(Items.Resource, 1, 12) }); + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), new Object[] { "##", "##", '#', new ItemStack(Items.Resource, 1, 10) }); + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 7), new Object[] { new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 7) }); + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 3), new Object[] { new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 3) }); + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), new Object[] { new ItemStack(Items.Resource, 1, 9), new ItemStack(BlockHandler.BlockBase, 1, 0) }); + GameRegistry.addRecipe(new ItemStack(Items.Resource, 2, 13), new Object[] { "#", "#", '#', new ItemStack(Items.Resource, 1, 12) }); + GameRegistry.addRecipe(new ItemStack(Items.Resource, 1, 3), new Object[] { "###", "#O#", "###", '#', new ItemStack(Items.Resource, 1, 4), 'O', new ItemStack(Items.Resource, 1, 2) }); + GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), new Object[] { Block.glass }); + GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), new Object[] { Block.obsidian }); + GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 8, 9), new Object[] { new ItemStack(Items.Resource, 1, 5), new ItemStack(Items.Resource, 1, 7), + new ItemStack(Items.Resource, 1, 8), new ItemStack(Items.Resource, 1, 6) }); } - - private static void Smelting() - { + + private static void Smelting() { FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 0, new ItemStack(Items.Resource, 1, 2), 0.9F); FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 3, new ItemStack(Items.Resource, 1, 1), 0.7F); FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 6, new ItemStack(Items.Resource, 1, 0), 0.4F); @@ -206,4 +68,43 @@ public class RecipeManager FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 7, new ItemStack(Items.Resource, 1, 10), 0.4F); FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 11, new ItemStack(Items.Resource, 1, 6), 0.4F); } + + private static void ToolRecipes() { + ToolRecipes.SwordRecipe(Items.VerditeSword, new ItemStack(Items.Resource, 1, 0)); + ToolRecipes.PickaxeRecipe(Items.VerditePickaxe, new ItemStack(Items.Resource, 1, 0)); + ToolRecipes.ShovelRecipe(Items.VerditeShovel, new ItemStack(Items.Resource, 1, 0)); + ToolRecipes.AxeRecipe(Items.VerditeAxe, new ItemStack(Items.Resource, 1, 0)); + ToolRecipes.HoeRecipe(Items.VerditeHoe, new ItemStack(Items.Resource, 1, 0)); + ToolRecipes.SwordRecipe(Items.MithrilSword, new ItemStack(Items.Resource, 1, 1)); + ToolRecipes.PickaxeRecipe(Items.MithrilPickaxe, new ItemStack(Items.Resource, 1, 1)); + ToolRecipes.ShovelRecipe(Items.MithrilShovel, new ItemStack(Items.Resource, 1, 1)); + ToolRecipes.AxeRecipe(Items.MithrilAxe, new ItemStack(Items.Resource, 1, 1)); + ToolRecipes.HoeRecipe(Items.MithrilHoe, new ItemStack(Items.Resource, 1, 1)); + ToolRecipes.AdvancedSwordRecipe(Items.AdamantineSword, new ItemStack(Items.Resource, 1, 2)); + ToolRecipes.AdvancedPickaxeRecipe(Items.AdamantinePickaxe, new ItemStack(Items.Resource, 1, 2)); + ToolRecipes.AdvancedShovelRecipe(Items.AdamantineShovel, new ItemStack(Items.Resource, 1, 2)); + ToolRecipes.AdvancedAxeRecipe(Items.AdamantineAxe, new ItemStack(Items.Resource, 1, 2)); + ToolRecipes.AdvancedHoeRecipe(Items.AdamantineHoe, new ItemStack(Items.Resource, 1, 2)); + ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedSwordRecipe(Items.IridiumSword, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedPickaxeRecipe(Items.IridiumPickaxe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, new ItemStack(Items.Resource, 1, 3)); + ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Block.obsidian)); + ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Block.obsidian)); + ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Block.obsidian)); + ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Block.obsidian)); + ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Block.obsidian)); + ToolRecipes.AdvancedSwordRecipe(Items.BloodstoneSword, new ItemStack(BlockHandler.BlockBase, 1, 7)); + ToolRecipes.AdvancedPickaxeRecipe(Items.BloodstonePickaxe, new ItemStack(BlockHandler.BlockBase, 1, 7)); + ToolRecipes.AdvancedShovelRecipe(Items.BloodstoneShovel, new ItemStack(BlockHandler.BlockBase, 1, 7)); + ToolRecipes.AdvancedAxeRecipe(Items.BloodstoneAxe, new ItemStack(BlockHandler.BlockBase, 1, 7)); + ToolRecipes.AdvancedHoeRecipe(Items.BloodstoneHoe, new ItemStack(BlockHandler.BlockBase, 1, 7)); + GameRegistry.addRecipe(new ItemStack(Items.Satchel, 1), new Object[] { "#$#", "$%$", "#$#", '#', Item.silk, '$', new ItemStack(Items.Resource, 1, 9), '%', Block.enderChest }); + } } diff --git a/common/MysticOres/Util/TabMysticOres.java b/common/MysticOres/Util/TabMysticOres.java index 19e178a..f1f0996 100644 --- a/common/MysticOres/Util/TabMysticOres.java +++ b/common/MysticOres/Util/TabMysticOres.java @@ -1,20 +1,16 @@ -package MysticOres.Util; +package mysticores.util; -import MysticOres.Blocks.BlockHandler; -import net.minecraft.block.Block; +import mysticores.blocks.BlockHandler; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; -public class TabMysticOres extends CreativeTabs -{ - public TabMysticOres(int par1, String par2Str) - { - super(par1, par2Str); +public class TabMysticOres extends CreativeTabs { + public TabMysticOres(int par1, String par2Str) { + super(par1, par2Str); } @Override - public ItemStack getIconItemStack() - { - return new ItemStack(BlockHandler.BlockBase, 1, 7); + public ItemStack getIconItemStack() { + return new ItemStack(BlockHandler.BlockBase, 1, 7); } } diff --git a/common/MysticOres/Util/ToolRecipes.java b/common/MysticOres/Util/ToolRecipes.java index 8173863..fba3478 100644 --- a/common/MysticOres/Util/ToolRecipes.java +++ b/common/MysticOres/Util/ToolRecipes.java @@ -1,90 +1,53 @@ -package MysticOres.Util; +package mysticores.util; -import MysticOres.Items.Items; +import mysticores.items.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapedOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; -public class ToolRecipes -{ - public static void SwordRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "#", "#", "S", 'S', "stickWood", '#', input)); +public class ToolRecipes { + public static void AdvancedAxeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "## ", "#S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "## ", "S# ", "S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); } - - public static void PickaxeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "###", " S ", " S ", 'S', "stickWood", '#', input)); + + public static void AdvancedHoeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "## ", " S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "## ", "S ", "S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); } - - public static void ShovelRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "#", "S", "S", 'S', "stickWood", '#', input)); + + public static void AdvancedPickaxeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "###", " S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); } - - public static void AxeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "## ", "#S ", " S ", 'S', "stickWood", '#', input)); - - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "## ", "S# ", "S ", 'S', "stickWood", '#', input)); + + public static void AdvancedShovelRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "#", "S", "S", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); } - - public static void HoeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "## ", " S ", " S ", 'S', "stickWood", '#', input)); - - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), - "## ", "S ", "S ", 'S', "stickWood", '#', input)); + + public static void AdvancedSwordRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "#", "#", "S", 'S', new ItemStack(Items.Resource, 1, 13), '#', input }); } - - - public static void AdvancedSwordRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "#", "#", "S", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); + + public static void AxeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "## ", "#S ", " S ", 'S', "stickWood", '#', input)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "## ", "S# ", "S ", 'S', "stickWood", '#', input)); } - - public static void AdvancedPickaxeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "###", " S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); + + public static void HoeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "## ", " S ", " S ", 'S', "stickWood", '#', input)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "## ", "S ", "S ", 'S', "stickWood", '#', input)); } - - public static void AdvancedShovelRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "#", "S", "S", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); + + public static void PickaxeRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "###", " S ", " S ", 'S', "stickWood", '#', input)); } - - public static void AdvancedAxeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "## ", "#S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); - - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "## ", "S# ", "S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); + + public static void ShovelRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "#", "S", "S", 'S', "stickWood", '#', input)); } - - public static void AdvancedHoeRecipe(Item output, ItemStack input) - { - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "## ", " S ", " S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); - - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "## ", "S ", "S ", 'S', new ItemStack(Items.Resource, 1, 13), '#', input - }); + + public static void SwordRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(output, 1), "#", "#", "S", 'S', "stickWood", '#', input)); } } diff --git a/common/MysticOres/Worldgen/GeneratorManager.java b/common/MysticOres/Worldgen/GeneratorManager.java index 83c43ae..7f0a0e5 100644 --- a/common/MysticOres/Worldgen/GeneratorManager.java +++ b/common/MysticOres/Worldgen/GeneratorManager.java @@ -1,13 +1,11 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import cpw.mods.fml.common.registry.GameRegistry; -public class GeneratorManager -{ - public static void Initialize() - { +public class GeneratorManager { + public static void Initialize() { GameRegistry.registerWorldGenerator(new WorldGenVerdite()); GameRegistry.registerWorldGenerator(new WorldGenTopaz()); GameRegistry.registerWorldGenerator(new WorldGenTourmaline()); diff --git a/common/MysticOres/Worldgen/NetherGenHelper.java b/common/MysticOres/Worldgen/NetherGenHelper.java index 97d1172..d5df96b 100644 --- a/common/MysticOres/Worldgen/NetherGenHelper.java +++ b/common/MysticOres/Worldgen/NetherGenHelper.java @@ -1,4 +1,4 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; diff --git a/common/MysticOres/Worldgen/NetherGenMineable.java b/common/MysticOres/Worldgen/NetherGenMineable.java index 4ca380a..b92be5d 100644 --- a/common/MysticOres/Worldgen/NetherGenMineable.java +++ b/common/MysticOres/Worldgen/NetherGenMineable.java @@ -1,4 +1,4 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; diff --git a/common/MysticOres/Worldgen/WorldGenAdamantine.java b/common/MysticOres/Worldgen/WorldGenAdamantine.java index 35b6d29..8c7f47b 100644 --- a/common/MysticOres/Worldgen/WorldGenAdamantine.java +++ b/common/MysticOres/Worldgen/WorldGenAdamantine.java @@ -1,30 +1,28 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenAdamantine implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { - for (int i = 0; i < Rarity.ADAMANTINE; i++) - { + for (int i = 0; i < Rarity.ADAMANTINE; i++) { int Xcoord = blockX + random.nextInt(8); int Ycoord = random.nextInt(16); int Zcoord = blockZ + random.nextInt(8); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 0, 3)).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticOres/Worldgen/WorldGenAgate.java b/common/MysticOres/Worldgen/WorldGenAgate.java index 7c12513..fa5fcc9 100644 --- a/common/MysticOres/Worldgen/WorldGenAgate.java +++ b/common/MysticOres/Worldgen/WorldGenAgate.java @@ -1,31 +1,29 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; -public class WorldGenAgate implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldGenAgate implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { - for (int i = 0; i < Rarity.AGATE; i++) - { + for (int i = 0; i < Rarity.AGATE; i++) { int Xcoord = blockX + random.nextInt(32); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(32); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 11, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticOres/Worldgen/WorldGenAmethyst.java b/common/MysticOres/Worldgen/WorldGenAmethyst.java index d2e0215..8d42c44 100644 --- a/common/MysticOres/Worldgen/WorldGenAmethyst.java +++ b/common/MysticOres/Worldgen/WorldGenAmethyst.java @@ -1,32 +1,29 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenAmethyst implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for (int i = 0; i < Rarity.AMETHYST; i++) - { + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Rarity.AMETHYST; i++) { int Xcoord = blockX + random.nextInt(24); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(24); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 1, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticOres/Worldgen/WorldGenIridium.java b/common/MysticOres/Worldgen/WorldGenIridium.java index 5e252b5..33cc6d3 100644 --- a/common/MysticOres/Worldgen/WorldGenIridium.java +++ b/common/MysticOres/Worldgen/WorldGenIridium.java @@ -1,32 +1,29 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenIridium implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for (int i = 0; i < Rarity.IRIDIUM; i++) - { + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Rarity.IRIDIUM; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(12); int Zcoord = blockZ + random.nextInt(16); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 2, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticOres/Worldgen/WorldGenMithril.java b/common/MysticOres/Worldgen/WorldGenMithril.java index 6984421..90bc76a 100644 --- a/common/MysticOres/Worldgen/WorldGenMithril.java +++ b/common/MysticOres/Worldgen/WorldGenMithril.java @@ -1,32 +1,30 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenMithril implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } - } + } private void generateSurface(World world, Random random, int blockX, int blockZ) { - for (int i = 0; i < Rarity.MITHRIL; i++) - { - int Xcoord = blockX + random.nextInt(16); - int Ycoord = random.nextInt(64); - int Zcoord = blockZ + random.nextInt(16); - - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 3, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); - } + for (int i = 0; i < Rarity.MITHRIL; i++) { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(64); + int Zcoord = blockZ + random.nextInt(16); + (new WorldGenMinable(BlockHandler.BlockBase.blockID, 3, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } } } \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenTopaz.java b/common/MysticOres/Worldgen/WorldGenTopaz.java index 1ebab56..6ddef33 100644 --- a/common/MysticOres/Worldgen/WorldGenTopaz.java +++ b/common/MysticOres/Worldgen/WorldGenTopaz.java @@ -1,32 +1,30 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenTopaz implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { - for (int i = 0; i < Rarity.TOPAZ; i++) - { + for (int i = 0; i < Rarity.TOPAZ; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(16); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 5, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } - } + } } \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenTourmaline.java b/common/MysticOres/Worldgen/WorldGenTourmaline.java index 2a43a9f..4559655 100644 --- a/common/MysticOres/Worldgen/WorldGenTourmaline.java +++ b/common/MysticOres/Worldgen/WorldGenTourmaline.java @@ -1,30 +1,30 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenTourmaline implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } - } + } private void generateSurface(World world, Random random, int blockX, int blockZ) { - for (int i = 0; i < Rarity.TOURMALINE; i++){ + for (int i = 0; i < Rarity.TOURMALINE; i++) { int Xcoord = blockX + random.nextInt(32); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(32); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 4, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } } - } \ No newline at end of file +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenVerdite.java b/common/MysticOres/Worldgen/WorldGenVerdite.java index 55b88e6..068dff2 100644 --- a/common/MysticOres/Worldgen/WorldGenVerdite.java +++ b/common/MysticOres/Worldgen/WorldGenVerdite.java @@ -1,32 +1,29 @@ -package MysticOres.Worldgen; +package mysticores.worldgen; import java.util.Random; +import mysticores.blocks.BlockHandler; +import mysticores.lib.Rarity; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; -import MysticOres.Blocks.BlockHandler; -import MysticOres.Lib.Rarity; import cpw.mods.fml.common.IWorldGenerator; public class WorldGenVerdite implements IWorldGenerator { - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch (world.provider.dimensionId) - { - case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for (int i = 0; i < Rarity.VERDITE; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Rarity.VERDITE; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(20) + 80; int Zcoord = blockZ + random.nextInt(16); - (new WorldGenMinable(BlockHandler.BlockBase.blockID, 6, 9, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticRuins/Config.java b/common/MysticRuins/Config.java index db0654f..f06189b 100644 --- a/common/MysticRuins/Config.java +++ b/common/MysticRuins/Config.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.io.File; diff --git a/common/MysticRuins/MysticRuins.java b/common/MysticRuins/MysticRuins.java index 9a349c6..c950e32 100644 --- a/common/MysticRuins/MysticRuins.java +++ b/common/MysticRuins/MysticRuins.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.io.File; import java.util.Random; diff --git a/common/MysticRuins/StructureMysticDungeon.java b/common/MysticRuins/StructureMysticDungeon.java index e43bc7d..d0d6a26 100644 --- a/common/MysticRuins/StructureMysticDungeon.java +++ b/common/MysticRuins/StructureMysticDungeon.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticRuins/StructureRuin$1.java b/common/MysticRuins/StructureRuin$1.java index 51fb9a9..7452946 100644 --- a/common/MysticRuins/StructureRuin$1.java +++ b/common/MysticRuins/StructureRuin$1.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticRuins/StructureRuin.java b/common/MysticRuins/StructureRuin.java index 1c27973..72cd51e 100644 --- a/common/MysticRuins/StructureRuin.java +++ b/common/MysticRuins/StructureRuin.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticRuins/WorldGenMysticDungeon.java b/common/MysticRuins/WorldGenMysticDungeon.java index 32ca657..d653494 100644 --- a/common/MysticRuins/WorldGenMysticDungeon.java +++ b/common/MysticRuins/WorldGenMysticDungeon.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticRuins/WorldGenRuin$1.java b/common/MysticRuins/WorldGenRuin$1.java index dc94a1f..50884cf 100644 --- a/common/MysticRuins/WorldGenRuin$1.java +++ b/common/MysticRuins/WorldGenRuin$1.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticRuins/WorldGenRuin.java b/common/MysticRuins/WorldGenRuin.java index 9b6503e..0d2fa25 100644 --- a/common/MysticRuins/WorldGenRuin.java +++ b/common/MysticRuins/WorldGenRuin.java @@ -1,4 +1,4 @@ -package MysticRuins; +package mysticruins; import java.util.Random; diff --git a/common/MysticStones/Blocks/BlockPlanks.java b/common/MysticStones/Blocks/BlockPlanks.java index bd32eaa..13987cc 100644 --- a/common/MysticStones/Blocks/BlockPlanks.java +++ b/common/MysticStones/Blocks/BlockPlanks.java @@ -1,9 +1,8 @@ -package MysticStones.Blocks; +package mysticstones.blocks; import java.util.List; -import java.util.Random; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -13,12 +12,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockPlanks extends Block { - Icon[] textures; public BlockPlanks(int ID) { @@ -29,63 +26,47 @@ public class BlockPlanks extends Block { setUnlocalizedName("BlockMysticPlanks"); setStepSound(Block.soundWoodFootstep); } - + @Override - public int damageDropped(int j) - { + public int damageDropped(int j) { return j; } - - public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) - { - int id = idPicked(world, x, y, z); - - if (id == 0) - { - return null; - } - - Item item = Item.itemsList[id]; - if (item == null) - { - return null; - } - - return new ItemStack(id, 1, getDamageValue(world, x, y, z)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[16]; - - for (int i = 0; i < 7; i++) - { - textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemPlanks.PLANK_TYPE[i]); - } - } - - @Override - public Icon getIcon(int side, int meta) - { + public Icon getIcon(int side, int meta) { return textures[meta]; } - - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - list.add(new ItemStack(i,1,0)); - list.add(new ItemStack(i,1,1)); - list.add(new ItemStack(i,1,2)); - list.add(new ItemStack(i,1,3)); - list.add(new ItemStack(i,1,4)); - list.add(new ItemStack(i,1,5)); - list.add(new ItemStack(i,1,6)); + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + int id = idPicked(world, x, y, z); + if (id == 0) { + return null; + } + Item item = Item.itemsList[id]; + if (item == null) { + return null; + } + return new ItemStack(id, 1, getDamageValue(world, x, y, z)); + } + + @Override + public void getSubBlocks(int i, CreativeTabs tab, List list) { + list.add(new ItemStack(i, 1, 0)); + list.add(new ItemStack(i, 1, 1)); + list.add(new ItemStack(i, 1, 2)); + list.add(new ItemStack(i, 1, 3)); + list.add(new ItemStack(i, 1, 4)); + list.add(new ItemStack(i, 1, 5)); + list.add(new ItemStack(i, 1, 6)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + textures = new Icon[16]; + for (int i = 0; i < 7; i++) { + textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemPlanks.PLANK_TYPE[i]); + } } - - } diff --git a/common/MysticStones/Blocks/BlockReinforced.java b/common/MysticStones/Blocks/BlockReinforced.java index 3828317..dbd894c 100644 --- a/common/MysticStones/Blocks/BlockReinforced.java +++ b/common/MysticStones/Blocks/BlockReinforced.java @@ -1,25 +1,21 @@ -package MysticStones.Blocks; +package mysticstones.blocks; import java.util.List; -import java.util.Random; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockReinforced extends Block { - Icon[] textures; public BlockReinforced(int ID) { @@ -30,60 +26,48 @@ public class BlockReinforced extends Block { setUnlocalizedName("BlockMysticReinforcedBrick"); setStepSound(Block.soundMetalFootstep); } - + @Override - public int damageDropped(int j) - { + public int damageDropped(int j) { return j; } - - public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) - { - return (true); - } - - public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) - { - int id = idPicked(world, x, y, z); - - if (id == 0) - { - return null; - } - - Item item = Item.itemsList[id]; - if (item == null) - { - return null; - } - - return new ItemStack(id, 1, getDamageValue(world, x, y, z)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[16]; - for (int i = 0; i < 8; i++) - { - textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemReinforced.BRICK_TYPE[i] + " Bricks"); - } - } - @Override - public Icon getIcon(int side, int meta) - { + public Icon getIcon(int side, int meta) { return textures[meta]; } - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - for(int k=0;k<8;k++) - { - list.add(new ItemStack(i,1,k)); + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + int id = idPicked(world, x, y, z); + if (id == 0) { + return null; + } + Item item = Item.itemsList[id]; + if (item == null) { + return null; + } + return new ItemStack(id, 1, getDamageValue(world, x, y, z)); + } + + @Override + public void getSubBlocks(int i, CreativeTabs tab, List list) { + for (int k = 0; k < 8; k++) { + list.add(new ItemStack(i, 1, k)); + } + } + + @Override + public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) { + return (true); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + textures = new Icon[16]; + for (int i = 0; i < 8; i++) { + textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemReinforced.BRICK_TYPE[i] + " Bricks"); } } } diff --git a/common/MysticStones/Blocks/BlockStoneBricks.java b/common/MysticStones/Blocks/BlockStoneBricks.java index eaf6337..c666c82 100644 --- a/common/MysticStones/Blocks/BlockStoneBricks.java +++ b/common/MysticStones/Blocks/BlockStoneBricks.java @@ -1,9 +1,8 @@ -package MysticStones.Blocks; +package mysticstones.blocks; import java.util.List; -import java.util.Random; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -13,14 +12,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockStoneBricks extends Block { - Icon[] textures; - + public BlockStoneBricks(int ID) { super(ID, Material.rock); setHardness(2F); @@ -29,59 +26,47 @@ public class BlockStoneBricks extends Block { setUnlocalizedName("BlockMysticStoneBricks"); setStepSound(Block.soundStoneFootstep); } - + @Override - public int damageDropped(int j) - { + public int damageDropped(int j) { return j; } - - public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) - { + + @Override + public Icon getIcon(int side, int meta) { + return textures[meta]; + } + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { int id = idPicked(world, x, y, z); - - if (id == 0) - { + if (id == 0) { return null; } - Item item = Item.itemsList[id]; - if (item == null) - { + if (item == null) { return null; } - return new ItemStack(id, 1, getDamageValue(world, x, y, z)); } - + + @Override + public void getSubBlocks(int i, CreativeTabs tab, List list) { + list.add(new ItemStack(i, 1, 0)); + list.add(new ItemStack(i, 1, 1)); + list.add(new ItemStack(i, 1, 2)); + list.add(new ItemStack(i, 1, 3)); + list.add(new ItemStack(i, 1, 4)); + list.add(new ItemStack(i, 1, 5)); + list.add(new ItemStack(i, 1, 6)); + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { textures = new Icon[16]; - - for (int i = 0; i < 7; i++) - { + for (int i = 0; i < 7; i++) { textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemStoneBricks.STONEBRICK_TYPES[i]); } } - - @Override - public Icon getIcon(int side, int meta) - { - return textures[meta]; - } - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - list.add(new ItemStack(i,1,0)); - list.add(new ItemStack(i,1,1)); - list.add(new ItemStack(i,1,2)); - list.add(new ItemStack(i,1,3)); - list.add(new ItemStack(i,1,4)); - list.add(new ItemStack(i,1,5)); - list.add(new ItemStack(i,1,6)); - } - - } diff --git a/common/MysticStones/Blocks/BlockStones.java b/common/MysticStones/Blocks/BlockStones.java index de96fc0..42735b3 100644 --- a/common/MysticStones/Blocks/BlockStones.java +++ b/common/MysticStones/Blocks/BlockStones.java @@ -1,24 +1,20 @@ -package MysticStones.Blocks; +package mysticstones.blocks; import java.util.List; -import java.util.Random; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockStones extends Block { - Icon[] textures; public BlockStones(int ID) { @@ -29,68 +25,69 @@ public class BlockStones extends Block { setUnlocalizedName("BlockMysticStones"); setStepSound(Block.soundStoneFootstep); } - + @Override - public int damageDropped(int j) - { - switch(j) - { - case 0:return 1; - case 2:return 3; - case 4:return 5; - case 6:return 7; - case 8:return 9; - case 10:return 11; - case 12:return 13; - default:return j; + public int damageDropped(int j) { + switch (j) { + case 0: + return 1; + case 2: + return 3; + case 4: + return 5; + case 6: + return 7; + case 8: + return 9; + case 10: + return 11; + case 12: + return 13; + default: + return j; } } - - protected boolean canSilkHarvest() - { - return true; + + @Override + public Icon getIcon(int side, int meta) { + return textures[meta]; } - - public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) - { + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - return new ItemStack(this, 1, meta); } - + + @Override + public void getSubBlocks(int i, CreativeTabs tab, List list) { + list.add(new ItemStack(i, 1, 0)); + list.add(new ItemStack(i, 1, 1)); + list.add(new ItemStack(i, 1, 2)); + list.add(new ItemStack(i, 1, 3)); + list.add(new ItemStack(i, 1, 4)); + list.add(new ItemStack(i, 1, 5)); + list.add(new ItemStack(i, 1, 6)); + list.add(new ItemStack(i, 1, 7)); + list.add(new ItemStack(i, 1, 8)); + list.add(new ItemStack(i, 1, 9)); + list.add(new ItemStack(i, 1, 10)); + list.add(new ItemStack(i, 1, 11)); + list.add(new ItemStack(i, 1, 12)); + list.add(new ItemStack(i, 1, 13)); + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { textures = new Icon[16]; - - for (int i = 0; i < 14; i++) - { + for (int i = 0; i < 14; i++) { textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemStones.STONE_TYPES[i]); } } - + @Override - public Icon getIcon(int side, int meta) - { - return textures[meta]; - } - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - list.add(new ItemStack(i,1,0)); - list.add(new ItemStack(i,1,1)); - list.add(new ItemStack(i,1,2)); - list.add(new ItemStack(i,1,3)); - list.add(new ItemStack(i,1,4)); - list.add(new ItemStack(i,1,5)); - list.add(new ItemStack(i,1,6)); - list.add(new ItemStack(i,1,7)); - list.add(new ItemStack(i,1,8)); - list.add(new ItemStack(i,1,9)); - list.add(new ItemStack(i,1,10)); - list.add(new ItemStack(i,1,11)); - list.add(new ItemStack(i,1,12)); - list.add(new ItemStack(i,1,13)); + protected boolean canSilkHarvest() { + return true; } } diff --git a/common/MysticStones/Blocks/ItemPlanks.java b/common/MysticStones/Blocks/ItemPlanks.java index cd2e9c8..941be61 100644 --- a/common/MysticStones/Blocks/ItemPlanks.java +++ b/common/MysticStones/Blocks/ItemPlanks.java @@ -1,40 +1,36 @@ -package MysticStones.Blocks; +package mysticstones.blocks; -import java.util.List; - -import MysticStones.MysticStones; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import mysticstones.MysticStones; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemPlanks extends ItemBlock { - - public static String[] PLANK_TYPE = new String[] {"Purple Planks", "Green Planks", "Black Planks", "Orange Planks", "Red Planks", "Blue Planks", "Yellow Planks"}; + public static String[] PLANK_TYPE = new String[] { "Purple Planks", "Green Planks", "Black Planks", "Orange Planks", "Red Planks", "Blue Planks", "Yellow Planks" }; public ItemPlanks(int par1) { super(par1); - setMaxDamage(0); - setHasSubtypes(true); + setMaxDamage(0); + setHasSubtypes(true); } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, PLANK_TYPE.length); - return PLANK_TYPE[meta]; - } - - public int getMetadata(int par1) - { - return par1; - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return MysticStones.Planks.getIcon(2, par1); - } + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) { + return MysticStones.Planks.getIcon(2, par1); + } + + @Override + public int getMetadata(int par1) { + return par1; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, PLANK_TYPE.length); + return PLANK_TYPE[meta]; + } } diff --git a/common/MysticStones/Blocks/ItemReinforced.java b/common/MysticStones/Blocks/ItemReinforced.java index 3983d34..41f669f 100644 --- a/common/MysticStones/Blocks/ItemReinforced.java +++ b/common/MysticStones/Blocks/ItemReinforced.java @@ -1,52 +1,47 @@ -package MysticStones.Blocks; +package mysticstones.blocks; import java.util.List; -import MysticStones.MysticStones; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import mysticstones.MysticStones; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemReinforced extends ItemBlock { - - public static String[] BRICK_TYPE = new String[] {"Mithril", "Verdite", "Iridium", "Adamantine", "Tourmaline", "Topaz", "Amethyst", "Agate"}; + public static String[] BRICK_TYPE = new String[] { "Mithril", "Verdite", "Iridium", "Adamantine", "Tourmaline", "Topaz", "Amethyst", "Agate" }; public ItemReinforced(int par1) { super(par1); - setMaxDamage(0); - setHasSubtypes(true); + setMaxDamage(0); + setHasSubtypes(true); } - - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BRICK_TYPE.length); - return BRICK_TYPE[meta] + " Bricks"; - } - - public int getMetadata(int par1) - { - return par1; - } - - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - if(par2EntityPlayer.isSneaking() == true) - { + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { + if (par2EntityPlayer.isSneaking() == true) { par3List.add("Works As A Beacon Block Too!"); } } - - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return MysticStones.ReinforcedBricks.getIcon(2, par1); - } + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) { + return MysticStones.ReinforcedBricks.getIcon(2, par1); + } + + @Override + public int getMetadata(int par1) { + return par1; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BRICK_TYPE.length); + return BRICK_TYPE[meta] + " Bricks"; + } } diff --git a/common/MysticStones/Blocks/ItemStoneBricks.java b/common/MysticStones/Blocks/ItemStoneBricks.java index d390a39..3070ca5 100644 --- a/common/MysticStones/Blocks/ItemStoneBricks.java +++ b/common/MysticStones/Blocks/ItemStoneBricks.java @@ -1,40 +1,36 @@ -package MysticStones.Blocks; +package mysticstones.blocks; -import java.util.List; - -import MysticStones.MysticStones; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import mysticstones.MysticStones; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemStoneBricks extends ItemBlock { - - public static String[] STONEBRICK_TYPES = new String[] {"Anorthosite Bricks", "Limestone Bricks", "Marble Bricks", "Migmatite Bricks", "Orthogneiss Bricks", "Slate Bricks", "Travertine Bricks"}; + public static String[] STONEBRICK_TYPES = new String[] { "Anorthosite Bricks", "Limestone Bricks", "Marble Bricks", "Migmatite Bricks", "Orthogneiss Bricks", "Slate Bricks", "Travertine Bricks" }; public ItemStoneBricks(int par1) { super(par1); - setMaxDamage(0); - setHasSubtypes(true); + setMaxDamage(0); + setHasSubtypes(true); } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, STONEBRICK_TYPES.length); - return STONEBRICK_TYPES[meta]; - } - - public int getMetadata(int par1) - { - return par1; - } - + @Override @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return MysticStones.StoneBricks.getIcon(2, par1); - } + public Icon getIconFromDamage(int par1) { + return MysticStones.StoneBricks.getIcon(2, par1); + } + + @Override + public int getMetadata(int par1) { + return par1; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, STONEBRICK_TYPES.length); + return STONEBRICK_TYPES[meta]; + } } diff --git a/common/MysticStones/Blocks/ItemStones.java b/common/MysticStones/Blocks/ItemStones.java index cbcd843..16d340c 100644 --- a/common/MysticStones/Blocks/ItemStones.java +++ b/common/MysticStones/Blocks/ItemStones.java @@ -1,42 +1,37 @@ -package MysticStones.Blocks; +package mysticstones.blocks; -import java.util.List; - -import MysticStones.MysticStones; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import mysticstones.MysticStones; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemStones extends ItemBlock { - - public static String[] STONE_TYPES = new String[] {"Smooth Anorthosite", "Anorthosite", "Smooth Limestone", "Limestone", "Smooth Marble", "Marble", "Smooth Migmatite", "Migmatite", - "Smooth Orthogneiss", "Orthogneiss", "Smooth Slate", "Slate", "Smooth Travertine", "Travertine"}; + public static String[] STONE_TYPES = new String[] { "Smooth Anorthosite", "Anorthosite", "Smooth Limestone", "Limestone", "Smooth Marble", "Marble", "Smooth Migmatite", "Migmatite", + "Smooth Orthogneiss", "Orthogneiss", "Smooth Slate", "Slate", "Smooth Travertine", "Travertine" }; public ItemStones(int par1) { super(par1); - setMaxDamage(0); - setHasSubtypes(true); + setMaxDamage(0); + setHasSubtypes(true); } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, STONE_TYPES.length); - return STONE_TYPES[meta]; - } - - @Override - public int getMetadata(int par1) - { - return par1; - } - + + @Override @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return MysticStones.Stones.getIcon(2, par1); - } - + public Icon getIconFromDamage(int par1) { + return MysticStones.Stones.getIcon(2, par1); + } + + @Override + public int getMetadata(int par1) { + return par1; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, STONE_TYPES.length); + return STONE_TYPES[meta]; + } } diff --git a/common/MysticStones/MysticStones.java b/common/MysticStones/MysticStones.java index 988129f..499715e 100644 --- a/common/MysticStones/MysticStones.java +++ b/common/MysticStones/MysticStones.java @@ -1,96 +1,71 @@ -package MysticStones; +package mysticstones; import java.io.File; -import java.util.Random; -import MysticStones.Blocks.BlockPlanks; -import MysticStones.Blocks.BlockReinforced; -import MysticStones.Blocks.BlockStoneBricks; -import MysticStones.Blocks.BlockStones; -import MysticStones.Blocks.ItemPlanks; -import MysticStones.Blocks.ItemReinforced; -import MysticStones.Blocks.ItemStoneBricks; -import MysticStones.Blocks.ItemStones; -import MysticStones.Util.Config; -import MysticStones.Util.Localizations; -import MysticStones.Util.RecipeHandler; -import MysticStones.Util.TabMysticStones; -import MysticStones.Worldgen.WorldgenSmoothAnorthosite; -import MysticStones.Worldgen.WorldgenSmoothLimestone; -import MysticStones.Worldgen.WorldgenSmoothMarble; -import MysticStones.Worldgen.WorldgenSmoothMigmatite; -import MysticStones.Worldgen.WorldgenSmoothOrthogneiss; -import MysticStones.Worldgen.WorldgenSmoothSlate; -import MysticStones.Worldgen.WorldgenSmoothTravertine; +import mysticstones.blocks.BlockPlanks; +import mysticstones.blocks.BlockReinforced; +import mysticstones.blocks.BlockStoneBricks; +import mysticstones.blocks.BlockStones; +import mysticstones.blocks.ItemPlanks; +import mysticstones.blocks.ItemReinforced; +import mysticstones.blocks.ItemStoneBricks; +import mysticstones.blocks.ItemStones; +import mysticstones.util.Config; +import mysticstones.util.Localizations; +import mysticstones.util.RecipeHandler; +import mysticstones.util.TabMysticStones; +import mysticstones.worldgen.WorldgenSmoothAnorthosite; +import mysticstones.worldgen.WorldgenSmoothLimestone; +import mysticstones.worldgen.WorldgenSmoothMarble; +import mysticstones.worldgen.WorldgenSmoothMigmatite; +import mysticstones.worldgen.WorldgenSmoothOrthogneiss; +import mysticstones.worldgen.WorldgenSmoothSlate; +import mysticstones.worldgen.WorldgenSmoothTravertine; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.common.DungeonHooks; -import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.MinecraftForge; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.Mod.PostInit; -import cpw.mods.fml.common.Mod.PreInit; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = "Mystic Stones", name = "Mystic Stones", version = "0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = false) - -public class MysticStones -{ +public class MysticStones { @Instance("Mystic Stones") public static MysticStones instance; - public static Block Planks; public static Block Stones; public static Block StoneBricks; public static Block ReinforcedBricks; - public static CreativeTabs MysticStonesTab = new TabMysticStones(CreativeTabs.getNextID(), "MysticStonesTab"); - private Configuration config; @EventHandler - public void preInit(FMLPreInitializationEvent event) - { + public void preInit(FMLPreInitializationEvent event) { Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic Stones.cfg")); - Config.save(); - + Config.save(); Planks = new BlockPlanks(Config.PlanksID); Stones = new BlockStones(Config.StonesID); StoneBricks = new BlockStoneBricks(Config.StoneBricksID); ReinforcedBricks = new BlockReinforced(Config.ReinforcedBricksID); - GameRegistry.registerBlock(Planks, ItemPlanks.class, "Planks"); GameRegistry.registerBlock(Stones, ItemStones.class, "Stones"); GameRegistry.registerBlock(StoneBricks, ItemStoneBricks.class, "StoneBricks"); GameRegistry.registerBlock(ReinforcedBricks, ItemReinforced.class, "Reinforcedbricks"); - Localizations.Initialize(); RecipeHandler.CraftPlanks(); RecipeHandler.CraftStoneBricks(); RecipeHandler.CraftElse(); RecipeHandler.CraftReinforced(); - GameRegistry.registerWorldGenerator(new WorldgenSmoothAnorthosite()); GameRegistry.registerWorldGenerator(new WorldgenSmoothLimestone()); GameRegistry.registerWorldGenerator(new WorldgenSmoothMarble()); GameRegistry.registerWorldGenerator(new WorldgenSmoothMigmatite()); GameRegistry.registerWorldGenerator(new WorldgenSmoothOrthogneiss()); GameRegistry.registerWorldGenerator(new WorldgenSmoothSlate()); - GameRegistry.registerWorldGenerator(new WorldgenSmoothTravertine()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothTravertine()); } } diff --git a/common/MysticStones/Util/Config.java b/common/MysticStones/Util/Config.java index cd9ed1e..31fc6ef 100644 --- a/common/MysticStones/Util/Config.java +++ b/common/MysticStones/Util/Config.java @@ -1,35 +1,28 @@ -package MysticStones.Util; +package mysticstones.util; import java.io.File; import net.minecraftforge.common.Configuration; -public class Config -{ +public class Config { public static Configuration config; - public static int PlanksID; public static int StonesID; public static int StoneBricksID; public static int ReinforcedBricksID; - public static boolean Rare; - - public static void initialize(File file) - { - config = new Configuration(file); - - PlanksID = config.getBlock("Plank IDs", 509).getInt(); - StonesID = config.getBlock("Stone IDs", 510).getInt(); - StoneBricksID = config.getBlock("Stone Brick IDs", 511).getInt(); - ReinforcedBricksID = config.getBlock("Reinforced Brick IDs", 512).getInt(); - Rare = config.get("General", "Increase the Rarity of Stones?", false).getBoolean(Rare); - - config.save(); - } - public static void save() - { - config.save(); - } + public static void initialize(File file) { + config = new Configuration(file); + PlanksID = config.getBlock("Plank IDs", 509).getInt(); + StonesID = config.getBlock("Stone IDs", 510).getInt(); + StoneBricksID = config.getBlock("Stone Brick IDs", 511).getInt(); + ReinforcedBricksID = config.getBlock("Reinforced Brick IDs", 512).getInt(); + Rare = config.get("General", "Increase the Rarity of Stones?", false).getBoolean(Rare); + config.save(); + } + + public static void save() { + config.save(); + } } \ No newline at end of file diff --git a/common/MysticStones/Util/Localizations.java b/common/MysticStones/Util/Localizations.java index 001b26e..bd81ec7 100644 --- a/common/MysticStones/Util/Localizations.java +++ b/common/MysticStones/Util/Localizations.java @@ -1,4 +1,4 @@ -package MysticStones.Util; +package mysticstones.util; import java.io.File; import java.io.IOException; @@ -10,10 +10,11 @@ import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.LanguageRegistry; + /* * * All credits go to copygirl (or copy....boy) for this one @@ -21,17 +22,14 @@ import cpw.mods.fml.common.registry.LanguageRegistry; * repository, many thanks friend c: * */ +public class Localizations { + private Localizations() { + } -public class Localizations -{ - private Localizations(){} - - public static void Initialize() - { + public static void Initialize() { File source = Loader.instance().getReversedModObjectList().get(MysticStones.instance).getSource(); Pattern pattern = Pattern.compile(".*(assets/" + "mysticmods/lang/(.+)\\.(.+))"); - for(String file : getResources(source, pattern)) - { + for (String file : getResources(source, pattern)) { Matcher matcher = pattern.matcher(file); matcher.find(); String resource = "/" + matcher.group(1); @@ -40,73 +38,58 @@ public class Localizations LanguageRegistry.instance().loadLocalization(resource, lang, isXML); } } - - private static Collection getResources(File file, Pattern pattern) - { + + private static Collection getResources(File file, Pattern pattern) { ArrayList retval = new ArrayList(); - if(file.isDirectory()) + if (file.isDirectory()) retval.addAll(getResourcesFromDirectory(file, pattern)); - else retval.addAll(getResourcesFromJarFile(file, pattern)); + else + retval.addAll(getResourcesFromJarFile(file, pattern)); return retval; } - - private static Collection getResourcesFromJarFile(File file, Pattern pattern) - { + + private static Collection getResourcesFromDirectory(File directory, Pattern pattern) { + ArrayList retval = new ArrayList(); + File[] FileList = directory.listFiles(); + for (File file : FileList) { + if (file.isDirectory()) { + retval.addAll(getResourcesFromDirectory(file, pattern)); + } else + try { + String fileName = file.getCanonicalPath().replace('\\', '/'); + boolean accept = pattern.matcher(fileName).matches(); + if (accept) + retval.add(fileName); + } catch (final IOException e) { + throw new Error(e); + } + } + return retval; + } + + private static Collection getResourcesFromJarFile(File file, Pattern pattern) { ArrayList retval = new ArrayList(); ZipFile Zip; - try - { + try { Zip = new ZipFile(file); - } - catch (ZipException Ex) - { + } catch (ZipException Ex) { throw new Error(Ex); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } Enumeration entries = Zip.entries(); - while (entries.hasMoreElements()) - { + while (entries.hasMoreElements()) { ZipEntry ZipE = entries.nextElement(); String FileName = ZipE.getName(); boolean accept = pattern.matcher(FileName).matches(); - if(accept) + if (accept) retval.add(FileName); } - try - { + try { Zip.close(); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } - return retval; - } - - private static Collection getResourcesFromDirectory(File directory, Pattern pattern) - { - ArrayList retval = new ArrayList(); - File[] FileList = directory.listFiles(); - for (File file : FileList) - { - if (file.isDirectory()) - { - retval.addAll(getResourcesFromDirectory(file, pattern)); - } - else try - { - String fileName = file.getCanonicalPath().replace('\\', '/'); - boolean accept = pattern.matcher(fileName).matches(); - if (accept) retval.add(fileName); - } - catch(final IOException e) - { - throw new Error(e); - } - } return retval; } } diff --git a/common/MysticStones/Util/RecipeHandler.java b/common/MysticStones/Util/RecipeHandler.java index 884684f..4ace4d9 100644 --- a/common/MysticStones/Util/RecipeHandler.java +++ b/common/MysticStones/Util/RecipeHandler.java @@ -1,6 +1,6 @@ -package MysticStones.Util; +package mysticstones.util; -import MysticStones.MysticStones; +import mysticstones.MysticStones; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; @@ -11,156 +11,26 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; -public class RecipeHandler -{ - public static void CraftPlanks() - { - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 0)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 1)})); - - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 2)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 3)})); - - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 4)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 5)})); - - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 6)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 7)})); - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 8)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 9)})); - - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 10)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 11)})); - - - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 12)})); - - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), - new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 13)})); - } - - public static void CraftReinforced() - { - if(Loader.isModLoaded("MysticOres")) - { - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "ingotMithril", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "ingotVerdite", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "ingotIridium", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "ingotAdamantine", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "gemTourmaline", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "gemTopaz", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "gemAmethyst", Character.valueOf('X'), Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), new Object[] { - "X#X", "###", "X#X", Character.valueOf('#'), "gemAgate", Character.valueOf('X'), Block.stone})); +public class RecipeHandler { + public static void CraftElse() { + if (Loader.isModLoaded("Mystic Ores") == true) { + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), true, new Object[] { "#$#", "$$$", "#$#", '$', "ingotMithril", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), true, new Object[] { "#$#", "$$$", "#$#", '$', "ingotVerdite", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), true, new Object[] { "#$#", "$$$", "#$#", '$', "ingotIridium", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), true, new Object[] { "#$#", "$$$", "#$#", '$', "ingotAdamantine", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), true, new Object[] { "#$#", "$$$", "#$#", '$', "gemTourmaline", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), true, new Object[] { "#$#", "$$$", "#$#", '$', "gemTopaz", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), true, new Object[] { "#$#", "$$$", "#$#", '$', "gemAmethyst", '#', Block.stone })); + CraftingManager.getInstance().getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), true, new Object[] { "#$#", "$$$", "#$#", '$', "gemAgate", '#', Block.stone })); } - - } - - public static void CraftStoneBricks() - { - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 0), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 0) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 1), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 2) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 2), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 4) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 3), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 6) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 4), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 8) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 5), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 10) - }); - - GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 6), new Object[] { - "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 12) - }); - } - - public static void CraftElse() - { - - if(Loader.isModLoaded("Mystic Ores") == true) - { - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), - true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotMithril", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), - true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotVerdite", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), - true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotIridium", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), - true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotAdamantine", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), - true, new Object[]{"#$#", "$$$", "#$#", '$', "gemTourmaline", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), - true, new Object[]{"#$#", "$$$", "#$#", '$', "gemTopaz", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), - true, new Object[]{"#$#", "$$$", "#$#", '$', "gemAmethyst", '#', Block.stone})); - - CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), - true, new Object[]{"#$#", "$$$", "#$#", '$', "gemAgate", '#', Block.stone})); - } - //smelting FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 1, new ItemStack(MysticStones.Stones, 1, 0), 0.1F); FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 3, new ItemStack(MysticStones.Stones, 1, 2), 0.1F); @@ -169,12 +39,80 @@ public class RecipeHandler FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 9, new ItemStack(MysticStones.Stones, 1, 8), 0.1F); FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 11, new ItemStack(MysticStones.Stones, 1, 10), 0.1F); FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 13, new ItemStack(MysticStones.Stones, 1, 12), 0.1F); - - for (int i=0;i<7;i++) - { + for (int i = 0; i < 7; i++) { OreDictionary.registerOre("plankWood", new ItemStack(MysticStones.Planks, 1, i)); } - - + } + + public static void CraftPlanks() { + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 0) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 1) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 2) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 3) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 4) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 5) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 6) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 7) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 8) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 9) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 10) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 11) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 12) })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), new Object[] { "plankWood", new ItemStack(MysticStones.Stones, 1, 13) })); + } + + public static void CraftReinforced() { + if (Loader.isModLoaded("MysticOres")) { + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "ingotMithril", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "ingotVerdite", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "ingotIridium", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "ingotAdamantine", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "gemTourmaline", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "gemTopaz", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "gemAmethyst", Character.valueOf('X'), + Block.stone })); + CraftingManager + .getInstance() + .getRecipeList() + .add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), new Object[] { "X#X", "###", "X#X", Character.valueOf('#'), "gemAgate", Character.valueOf('X'), + Block.stone })); + } + } + + public static void CraftStoneBricks() { + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 0), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 0) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 1), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 2) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 2), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 4) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 3), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 6) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 4), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 8) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 5), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 10) }); + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 6), new Object[] { "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 12) }); } } diff --git a/common/MysticStones/Util/TabMysticStones.java b/common/MysticStones/Util/TabMysticStones.java index ec834a5..8affce5 100644 --- a/common/MysticStones/Util/TabMysticStones.java +++ b/common/MysticStones/Util/TabMysticStones.java @@ -1,12 +1,10 @@ -package MysticStones.Util; +package mysticstones.util; -import MysticStones.MysticStones; -import net.minecraft.block.Block; +import mysticstones.MysticStones; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; public class TabMysticStones extends CreativeTabs { - public TabMysticStones(int par1, String par2Str) { super(par1, par2Str); // TODO Auto-generated constructor stub @@ -14,7 +12,6 @@ public class TabMysticStones extends CreativeTabs { @Override public ItemStack getIconItemStack() { - return new ItemStack(MysticStones.ReinforcedBricks, 1, 4); + return new ItemStack(MysticStones.ReinforcedBricks, 1, 4); } - } diff --git a/common/MysticStones/Worldgen/WorldgenSmoothAnorthosite.java b/common/MysticStones/Worldgen/WorldgenSmoothAnorthosite.java index 84e4e7d..6671afa 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothAnorthosite.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothAnorthosite.java @@ -1,29 +1,26 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothAnorthosite implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothAnorthosite implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; int Zcoord = blockZ + random.nextInt(16); diff --git a/common/MysticStones/Worldgen/WorldgenSmoothLimestone.java b/common/MysticStones/Worldgen/WorldgenSmoothLimestone.java index c740281..4c4900b 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothLimestone.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothLimestone.java @@ -1,29 +1,26 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothLimestone implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothLimestone implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; int Zcoord = blockZ + random.nextInt(16); diff --git a/common/MysticStones/Worldgen/WorldgenSmoothMarble.java b/common/MysticStones/Worldgen/WorldgenSmoothMarble.java index aef4cf8..4c1b11b 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothMarble.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothMarble.java @@ -1,32 +1,29 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothMarble implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothMarble implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random ,int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; - int Zcoord = blockZ + random.nextInt(16); + int Zcoord = blockZ + random.nextInt(16); new WorldGenMinable(MysticStones.Stones.blockID, 4, 24, Block.stone.blockID).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticStones/Worldgen/WorldgenSmoothMigmatite.java b/common/MysticStones/Worldgen/WorldgenSmoothMigmatite.java index 2ea666b..ccdc456 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothMigmatite.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothMigmatite.java @@ -1,32 +1,29 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothMigmatite implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothMigmatite implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; - int Zcoord = blockZ + random.nextInt(16); + int Zcoord = blockZ + random.nextInt(16); new WorldGenMinable(MysticStones.Stones.blockID, 6, 48, Block.stone.blockID).generate(world, random, Xcoord, Ycoord, Zcoord); } } diff --git a/common/MysticStones/Worldgen/WorldgenSmoothOrthogneiss.java b/common/MysticStones/Worldgen/WorldgenSmoothOrthogneiss.java index 75dbea5..690373b 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothOrthogneiss.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothOrthogneiss.java @@ -1,29 +1,26 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothOrthogneiss implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothOrthogneiss implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<3 : i<2; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 3 : i < 2; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; int Zcoord = blockZ + random.nextInt(16); diff --git a/common/MysticStones/Worldgen/WorldgenSmoothSlate.java b/common/MysticStones/Worldgen/WorldgenSmoothSlate.java index 801b67e..d857fc1 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothSlate.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothSlate.java @@ -1,29 +1,26 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothSlate implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothSlate implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; int Zcoord = blockZ + random.nextInt(16); diff --git a/common/MysticStones/Worldgen/WorldgenSmoothTravertine.java b/common/MysticStones/Worldgen/WorldgenSmoothTravertine.java index 31074a0..525b240 100644 --- a/common/MysticStones/Worldgen/WorldgenSmoothTravertine.java +++ b/common/MysticStones/Worldgen/WorldgenSmoothTravertine.java @@ -1,33 +1,30 @@ -package MysticStones.Worldgen; +package mysticstones.worldgen; import java.util.Random; -import MysticStones.MysticStones; -import MysticStones.Util.Config; +import mysticstones.MysticStones; +import mysticstones.util.Config; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; -public class WorldgenSmoothTravertine implements IWorldGenerator -{ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) - { - switch(world.provider.dimensionId) - { - case 0:generateSurface(world, random, chunkX*16, chunkZ*16); +public class WorldgenSmoothTravertine implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); } } - - private void generateSurface(World world, Random random, int blockX, int blockZ) - { - for(int i=0; Config.Rare ? i<2 : i<3; i++) - { + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; Config.Rare ? i < 2 : i < 3; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(40) + 20; int Zcoord = blockZ + random.nextInt(16); - new WorldGenMinable(MysticStones.Stones.blockID, 12, 24, Block.stone.blockID).generate(world, random, Xcoord, Ycoord, Zcoord); + new WorldGenMinable(MysticStones.Stones.blockID, 12, 24, Block.stone.blockID).generate(world, random, Xcoord, Ycoord, Zcoord); } } } \ No newline at end of file diff --git a/common/MysticWorld/Biome/BiomeGenBasic.java b/common/MysticWorld/Biome/BiomeGenBasic.java index 0b8d7b1..1498d6c 100644 --- a/common/MysticWorld/Biome/BiomeGenBasic.java +++ b/common/MysticWorld/Biome/BiomeGenBasic.java @@ -1,4 +1,4 @@ -package MysticWorld.Biome; +package mysticworld.biome; import java.util.Random; diff --git a/common/MysticWorld/Biome/BiomeGenGlacier.java b/common/MysticWorld/Biome/BiomeGenGlacier.java index 50dfc60..50e406b 100644 --- a/common/MysticWorld/Biome/BiomeGenGlacier.java +++ b/common/MysticWorld/Biome/BiomeGenGlacier.java @@ -1,4 +1,4 @@ -package MysticWorld.Biome; +package mysticworld.biome; import java.util.Random; diff --git a/common/MysticWorld/Biome/BiomeGenJungle.java b/common/MysticWorld/Biome/BiomeGenJungle.java index 3de2e7f..98a4025 100644 --- a/common/MysticWorld/Biome/BiomeGenJungle.java +++ b/common/MysticWorld/Biome/BiomeGenJungle.java @@ -1,4 +1,4 @@ -package MysticWorld.Biome; +package mysticworld.biome; import java.util.Random; import net.minecraft.block.Block; diff --git a/common/MysticWorld/Biome/BiomeGenMountain.java b/common/MysticWorld/Biome/BiomeGenMountain.java index e615d6a..0b97b09 100644 --- a/common/MysticWorld/Biome/BiomeGenMountain.java +++ b/common/MysticWorld/Biome/BiomeGenMountain.java @@ -1,4 +1,4 @@ -package MysticWorld.Biome; +package mysticworld.biome; import java.util.Random; diff --git a/common/MysticWorld/Biome/BiomeGenTundra.java b/common/MysticWorld/Biome/BiomeGenTundra.java index 5bcba34..c25326a 100644 --- a/common/MysticWorld/Biome/BiomeGenTundra.java +++ b/common/MysticWorld/Biome/BiomeGenTundra.java @@ -1,4 +1,4 @@ -package MysticWorld.Biome; +package mysticworld.biome; import java.util.Random; diff --git a/common/MysticWorld/Biome/BiomeHandler.java b/common/MysticWorld/Biome/BiomeHandler.java index e5c1c24..9f245d7 100644 --- a/common/MysticWorld/Biome/BiomeHandler.java +++ b/common/MysticWorld/Biome/BiomeHandler.java @@ -1,68 +1,61 @@ -package MysticWorld.Biome; +package mysticworld.biome; -import cpw.mods.fml.common.registry.GameRegistry; -import MysticWorld.Lib.*; -import MysticOres.Blocks.BlockHandler; +import mysticworld.lib.Booleans; import net.minecraft.block.Block; -import net.minecraft.world.biome.BiomeDecorator; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeManager; +import cpw.mods.fml.common.registry.GameRegistry; -public class BiomeHandler -{ +public class BiomeHandler { public static BiomeGenBase Mountain; public static BiomeGenBase Tundra; public static BiomeGenBase Steppe; public static BiomeGenBase Glacier; public static BiomeGenBase Jungle; - - public static void init() - { + + public static void init() { initializeBiomes(); registerBiomes(); } - - public static void initializeBiomes() - { - Mountain = new BiomeGenMountain(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.5F, 1.0F); - Tundra = new BiomeGenTundra(24, 0, 0, 0, 0, Block.blockSnow.blockID, Block.blockSnow.blockID).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.8F, 0.4F); + + public static void initializeBiomes() { + Mountain = new BiomeGenMountain(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F) + .setMinMaxHeight(0.5F, 1.0F); + Tundra = new BiomeGenTundra(24, 0, 0, 0, 0, Block.blockSnow.blockID, Block.blockSnow.blockID).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F) + .setMinMaxHeight(0.8F, 0.4F); Steppe = new BiomeGenBasic(25, 0, 2, 2, 3, Block.grass.blockID, Block.dirt.blockID).setColor(5470985).setBiomeName("Steppe").setMinMaxHeight(0.1F, 0.1F); - Glacier = new BiomeGenGlacier(26, 0, 0, 0, 0, Block.ice.blockID, Block.ice.blockID).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.5F, 0.7F); - Jungle = new BiomeGenJungle(27).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.2F, 0.4F);; + Glacier = new BiomeGenGlacier(26, 0, 0, 0, 0, Block.ice.blockID, Block.ice.blockID).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F) + .setMinMaxHeight(0.5F, 0.7F); + Jungle = new BiomeGenJungle(27).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.2F, 0.4F); + ; } - - public static void registerBiomes() - { - if(Booleans.ENABLE_JUNGLE_REWRITE) - { + + public static void registerBiomes() { + if (Booleans.ENABLE_JUNGLE_REWRITE) { GameRegistry.removeBiome(BiomeGenBase.jungle); GameRegistry.removeBiome(BiomeGenBase.jungleHills); - GameRegistry.addBiome(Jungle); - BiomeManager.addSpawnBiome(Jungle); + GameRegistry.addBiome(Jungle); + BiomeManager.addSpawnBiome(Jungle); BiomeManager.addStrongholdBiome(Jungle); } - if(Booleans.ENABLE_GLACIER_GEN) - { - GameRegistry.addBiome(Glacier); - BiomeManager.addStrongholdBiome(Glacier); + if (Booleans.ENABLE_GLACIER_GEN) { + GameRegistry.addBiome(Glacier); + BiomeManager.addStrongholdBiome(Glacier); } - if(Booleans.ENABLE_MOUNTAIN_GEN) - { + if (Booleans.ENABLE_MOUNTAIN_GEN) { GameRegistry.addBiome(Mountain); BiomeManager.addSpawnBiome(Mountain); BiomeManager.addStrongholdBiome(Mountain); } - if(Booleans.ENABLE_TUNDRA_GEN) - { - GameRegistry.addBiome(Tundra); - BiomeManager.addStrongholdBiome(Tundra); - } - if(Booleans.ENABLE_STEPPE_GEN) - { - GameRegistry.addBiome(Steppe); - BiomeManager.addSpawnBiome(Steppe); + if (Booleans.ENABLE_TUNDRA_GEN) { + GameRegistry.addBiome(Tundra); + BiomeManager.addStrongholdBiome(Tundra); + } + if (Booleans.ENABLE_STEPPE_GEN) { + GameRegistry.addBiome(Steppe); + BiomeManager.addSpawnBiome(Steppe); BiomeManager.addVillageBiome(Steppe, true); BiomeManager.addStrongholdBiome(Steppe); - } + } } } diff --git a/common/MysticWorld/Blocks/BlockBush.java b/common/MysticWorld/Blocks/BlockBush.java index effb586..25635c5 100644 --- a/common/MysticWorld/Blocks/BlockBush.java +++ b/common/MysticWorld/Blocks/BlockBush.java @@ -1,27 +1,17 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; -import java.util.ArrayList; import java.util.List; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import MysticWorld.MysticWorld; -import MysticWorld.Items.ItemHandler$1; -import MysticWorld.Lib.BlockIds; -import MysticWorld.Lib.Strings; +import mysticworld.MysticWorld; +import mysticworld.items.ItemHandler$1; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.Icon; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; @@ -29,12 +19,12 @@ import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.IShearable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class BlockBush extends Block implements IPlantable{ - +public class BlockBush extends Block implements IPlantable { Icon[] textures; - + public BlockBush(int id) { super(id, Material.leaves); setCreativeTab(MysticWorld.MysticWorldTab); @@ -43,154 +33,138 @@ public class BlockBush extends Block implements IPlantable{ setStepSound(Block.soundGrassFootstep); setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); } - + + @Override + public boolean canBlockStay(World par1World, int par2, int par3, int par4) { + Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; + return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) + && (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this)); + } + + //Plant Specific Stuff + @Override + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { + return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4); + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[16]; - - for (int i = 0; i < 12; i++) - { - textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemBush.BUSH_TYPES[i]); - } + public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { + int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4); + return l == -1 ? 16777215 : par1IBlockAccess.getBiomeGenForCoords(par2, par4).getBiomeGrassColor(); } - - //Plant Specific Stuff - - public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) - { - return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4); - } - - protected boolean canThisPlantGrowOnThisBlockID(int par1) - { - return par1 == Block.grass.blockID || par1 == Block.dirt.blockID; - } - - public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) - { - super.onNeighborBlockChange(par1World, par2, par3, par4, par5); - this.checkBushChange(par1World, par2, par3, par4); - } - public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - this.checkBushChange(par1World, par2, par3, par4); - } - - protected final void checkBushChange(World par1World, int par2, int par3, int par4) - { - if (!this.canBlockStay(par1World, par2, par3, par4)) - { - this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); - par1World.setBlockToAir(par2, par3, par4); - } - } - - public boolean canBlockStay(World par1World, int par2, int par3, int par4) - { - Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; - return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && - (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this)); - } - - public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) - { - super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); - } - - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - public EnumPlantType getPlantType(World world, int x, int y, int z) - { + @Override + public int damageDropped(int j) { + return j; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBlockColor() { + double d0 = 0.5D; + double d1 = 1.0D; + return ColorizerGrass.getGrassColor(d0, d1); + } + + @Override + public int getDamageValue(World par1World, int par2, int par3, int par4) { + return par1World.getBlockMetadata(par2, par3, par4); + } + + //Sprite Inits + @Override + public Icon getIcon(int side, int meta) { + return textures[meta]; + } + + @Override + public int getPlantID(World world, int x, int y, int z) { + return 0; + } + + @Override + public int getPlantMetadata(World world, int x, int y, int z) { + return 0; + } + + @Override + public EnumPlantType getPlantType(World world, int x, int y, int z) { return EnumPlantType.Plains; } @Override - public int getPlantID(World world, int x, int y, int z) - { - return 0; + @SideOnly(Side.CLIENT) + public int getRenderColor(int par1) { + return par1 == -1 ? 16777215 : ColorizerFoliage.getFoliageColorBasic(); } @Override - public int getPlantMetadata(World world, int x, int y, int z) - { - return 0; - } - - //Sprite Inits - @Override - public Icon getIcon(int side, int meta) - { - return textures[meta]; - } - - public boolean isOpaqueCube() - { - return false; - } - - @SideOnly(Side.CLIENT) - public int getBlockColor() - { - double d0 = 0.5D; - double d1 = 1.0D; - return ColorizerGrass.getGrassColor(d0, d1); - } - - @SideOnly(Side.CLIENT) - public int getRenderColor(int par1) - { - return par1 == -1 ? 16777215 : ColorizerFoliage.getFoliageColorBasic(); - } - - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) - { - int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4); - return l == -1 ? 16777215 : par1IBlockAccess.getBiomeGenForCoords(par2, par4).getBiomeGrassColor(); - } - - //Meta Inits - - public int quantityDroppedWithBonus(int par1, Random par2Random) - { - return 1 + par2Random.nextInt(par1 * 2 + 1); - } - - public int idDropped(int par1, Random par2Random, int par3) - { - return ItemHandler$1.bushFruit.itemID; - } - - @Override - public int damageDropped(int j) - { - return j; - } - - public int idPicked(World par1World, int par2, int par3, int par4) - { - return blockID; - } - - public int getDamageValue(World par1World, int par2, int par3, int par4) - { - return par1World.getBlockMetadata(par2, par3, par4); - } - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - for(int j=0;j<12;j++) - { - list.add(new ItemStack(i,1,j)); + public void getSubBlocks(int i, CreativeTabs tab, List list) { + for (int j = 0; j < 12; j++) { + list.add(new ItemStack(i, 1, j)); } } - + @Override + public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) { + super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); + } + + @Override + public int idDropped(int par1, Random par2Random, int par3) { + return ItemHandler$1.bushFruit.itemID; + } + + @Override + public int idPicked(World par1World, int par2, int par3, int par4) { + return blockID; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) { + super.onNeighborBlockChange(par1World, par2, par3, par4, par5); + this.checkBushChange(par1World, par2, par3, par4); + } + + //Meta Inits + @Override + public int quantityDroppedWithBonus(int par1, Random par2Random) { + return 1 + par2Random.nextInt(par1 * 2 + 1); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + textures = new Icon[16]; + for (int i = 0; i < 12; i++) { + textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemBush.BUSH_TYPES[i]); + } + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { + this.checkBushChange(par1World, par2, par3, par4); + } + + protected boolean canThisPlantGrowOnThisBlockID(int par1) { + return par1 == Block.grass.blockID || par1 == Block.dirt.blockID; + } + + protected final void checkBushChange(World par1World, int par2, int par3, int par4) { + if (!this.canBlockStay(par1World, par2, par3, par4)) { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlockToAir(par2, par3, par4); + } + } } diff --git a/common/MysticWorld/Blocks/BlockHandler.java b/common/MysticWorld/Blocks/BlockHandler.java index 41fb2ac..cbc0abe 100644 --- a/common/MysticWorld/Blocks/BlockHandler.java +++ b/common/MysticWorld/Blocks/BlockHandler.java @@ -1,47 +1,33 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; -import MysticWorld.Lib.BlockIds; -import MysticWorld.Lib.Booleans; -import MysticWorld.Lib.Strings; -import MysticWorld.WorldGen.StonesGen; -import MysticWorld.WorldGen.WorldGenBushes; -import MysticWorld.WorldGen.WorldGenStones; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; +import mysticworld.lib.BlockIds; +import mysticworld.lib.Strings; import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.registry.GameRegistry; public class BlockHandler { - public static Block oreImbuedStone; public static Block bush; public static Block lightCube; - public static Block pillarPlatform; public static Block pillar; public static Block pillarInsert; - + public static void init() { oreImbuedStone = new BlockImbuedStone(BlockIds.ORE_STONE_1).setUnlocalizedName(Strings.IMBUED_STONE_NAME); bush = new BlockBush(BlockIds.BUSH).setUnlocalizedName(Strings.BUSH_NAME); lightCube = new BlockLightCube(BlockIds.LIGHT_CUBE).setUnlocalizedName(Strings.LIGHT_CUBE_NAME); - pillarPlatform = new BlockPlatform(BlockIds.PLATFORM).setUnlocalizedName(Strings.PLATFORM_NAME); pillar = new BlockPillar(BlockIds.PILLAR).setUnlocalizedName(Strings.PILLAR_NAME); pillarInsert = new BlockPillarInsert(BlockIds.PILLAR_INSERT).setUnlocalizedName(Strings.PILLAR_INSERT_NAME); - registerBlocks(); setBlockHarvestLevels(); } - + private static void registerBlocks() { GameRegistry.registerBlock(oreImbuedStone, ItemImbuedStone.class, Strings.IMBUED_STONE_NAME); GameRegistry.registerBlock(bush, ItemBush.class, Strings.BUSH_NAME); GameRegistry.registerBlock(lightCube, Strings.LIGHT_CUBE_NAME); - GameRegistry.registerBlock(pillarPlatform, Strings.PLATFORM_NAME); GameRegistry.registerBlock(pillar, Strings.PILLAR_NAME); GameRegistry.registerBlock(pillarInsert, Strings.PILLAR_INSERT_NAME); diff --git a/common/MysticWorld/Blocks/BlockImbuedStone.java b/common/MysticWorld/Blocks/BlockImbuedStone.java index 5034e3e..2c696aa 100644 --- a/common/MysticWorld/Blocks/BlockImbuedStone.java +++ b/common/MysticWorld/Blocks/BlockImbuedStone.java @@ -1,34 +1,24 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; import java.util.List; import java.util.Random; +import mysticworld.MysticWorld; +import mysticworld.items.ItemHandler$1; import net.minecraft.block.Block; -import net.minecraft.block.BlockBreakable; import net.minecraft.block.BlockFence; import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import MysticWorld.MysticWorld; -import MysticWorld.Items.ItemHandler$1; - public class BlockImbuedStone extends Block { - Icon[] textures; - + public BlockImbuedStone(int ID) { super(ID, Material.rock); setHardness(0.5F); @@ -37,97 +27,86 @@ public class BlockImbuedStone extends Block { setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.125F, 0.75F); setLightValue(0.625f); } - + + @Override + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { + return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4); + } + + @Override + public int damageDropped(int j) { + return j; + } + + @Override + public int getDamageValue(World par1World, int par2, int par3, int par4) { + return par1World.getBlockMetadata(par2, par3, par4); + } + + @Override + public Icon getIcon(int side, int meta) { + return textures[meta]; + } + + @Override + public void getSubBlocks(int i, CreativeTabs tab, List list) { + for (int j = 0; j < 5; j++) { + list.add(new ItemStack(i, 1, j)); + } + } + + @Override + public int idDropped(int par1, Random par2Random, int par3) { + return ItemHandler$1.imbuedShard.itemID; + } + + @Override + public int idPicked(World par1World, int par2, int par3, int par4) { + return blockID; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) { + this.dropXpOnBlockBreak(world, x, y, z, xpDropAmount(meta)); + } + + @Override + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) { + boolean flag = false; + if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4))) { + flag = true; + } + if (flag) { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlockToAir(par2, par3, par4); + } + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { textures = new Icon[16]; - - for (int i = 0; i < 5; i++) - { + for (int i = 0; i < 5; i++) { textures[i] = iconRegister.registerIcon("MysticMods" + ":" + ItemImbuedStone.IMBUED_STONE_TYPE[i] + " Imbued Stone"); } } - - public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) - { - return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4); - } - - public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) - { - boolean flag = false; - if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4))) - { - flag = true; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } - if (flag) - { - this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); - par1World.setBlockToAir(par2, par3, par4); - } - } - - @Override - public Icon getIcon(int side, int meta) - { - return textures[meta]; - } - - public int idDropped(int par1, Random par2Random, int par3) - { - return ItemHandler$1.imbuedShard.itemID; - } - - @Override - public int damageDropped(int j) - { - return j; - } - - public int xpDropAmount(int j) - { + public int xpDropAmount(int j) { return 5; } - public boolean renderAsNormalBlock() - { - return false; - } - - public boolean isOpaqueCube() - { - return false; - } - - protected boolean canSilkHarvest() - { - return true; - } - - public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) - { - this.dropXpOnBlockBreak(world, x, y, z, xpDropAmount(meta)); - } - - public int idPicked(World par1World, int par2, int par3, int par4) - { - return blockID; - } - - public int getDamageValue(World par1World, int par2, int par3, int par4) - { - return par1World.getBlockMetadata(par2, par3, par4); - } - - public void getSubBlocks(int i,CreativeTabs tab, List list) - { - for(int j=0;j<5;j++) - { - list.add(new ItemStack(i,1,j)); - } + @Override + protected boolean canSilkHarvest() { + return true; } } \ No newline at end of file diff --git a/common/MysticWorld/Blocks/BlockLightCube.java b/common/MysticWorld/Blocks/BlockLightCube.java index e67e346..87e1d8b 100644 --- a/common/MysticWorld/Blocks/BlockLightCube.java +++ b/common/MysticWorld/Blocks/BlockLightCube.java @@ -1,62 +1,52 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import MysticWorld.MysticWorld; -import MysticWorld.Items.ItemHandler$1; +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockLightCube extends Block { - public BlockLightCube(int id) { super(id, Material.circuits); setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); setLightValue(1.0F); this.setTickRandomly(true); } - + @Override - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - protected boolean canSilkHarvest() - { - return true; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int idDropped(int par1, Random par2Random, int par3) - { + public int idDropped(int par1, Random par2Random, int par3) { return 0; - } - + } + @Override - public void randomDisplayTick(World world, int x, int y, int z, Random random) - { - MysticWorld.proxy.lightCubeFX(world, (double)x + random.nextDouble(), (double)y + 0.75D, (double)z + random.nextDouble(), 0.0D, 0.0D, 0.0D, 1.0F); - MysticWorld.proxy.lightCubeFX(world, (double)x + random.nextDouble(), (double)y + 0.75D, (double)z + random.nextDouble(), 0.0D, 0.0D, 0.0D, 1.0F); - } - + public boolean isOpaqueCube() { + return false; + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + MysticWorld.proxy.lightCubeFX(world, x + random.nextDouble(), y + 0.75D, z + random.nextDouble(), 0.0D, 0.0D, 0.0D, 1.0F); + MysticWorld.proxy.lightCubeFX(world, x + random.nextDouble(), y + 0.75D, z + random.nextDouble(), 0.0D, 0.0D, 0.0D, 1.0F); + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("MysticMods" + ":" + "lightCube"); } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + protected boolean canSilkHarvest() { + return true; + } } diff --git a/common/MysticWorld/Blocks/BlockPillar.java b/common/MysticWorld/Blocks/BlockPillar.java index 2f4e1a2..0ac068d 100644 --- a/common/MysticWorld/Blocks/BlockPillar.java +++ b/common/MysticWorld/Blocks/BlockPillar.java @@ -1,14 +1,13 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockPillar extends Block { - public BlockPillar(int id) { super(id, Material.rock); setBlockUnbreakable(); @@ -16,22 +15,20 @@ public class BlockPillar extends Block { setCreativeTab(MysticWorld.MysticWorldTab); setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F); } - - public boolean renderAsNormalBlock() - { - return false; - } - - public boolean isOpaqueCube() - { - return false; - } - + + @Override + public boolean isOpaqueCube() { + return false; + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("MysticMods" + ":" + "Pillar"); } + @Override + public boolean renderAsNormalBlock() { + return false; + } } diff --git a/common/MysticWorld/Blocks/BlockPillarInsert.java b/common/MysticWorld/Blocks/BlockPillarInsert.java index a59a934..7166b1d 100644 --- a/common/MysticWorld/Blocks/BlockPillarInsert.java +++ b/common/MysticWorld/Blocks/BlockPillarInsert.java @@ -1,75 +1,62 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; -import MysticWorld.MysticWorld; -import MysticWorld.Lib.RenderIds; -import MysticWorld.TileEntity.TileEntityPillarInsert; +import mysticworld.MysticWorld; +import mysticworld.lib.RenderIds; +import mysticworld.tiles.TileEntityPillarInsert; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockPillarInsert extends BlockContainer { - - public BlockPillarInsert(int id) - { + public BlockPillarInsert(int id) { super(id, Material.rock); this.setBlockUnbreakable(); this.setResistance(6000000.0F); this.setCreativeTab(MysticWorld.MysticWorldTab); setBlockBounds(0.125F, 0.0F, 0.125F, 0.875F, 1.0F, 0.875F); } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) - { - if (world.isRemote) - { - if (Item.enderPearl.itemID == entityPlayer.inventory.getCurrentItem().itemID) - { - TileEntity te = world.getBlockTileEntity(x, y, z); - } - } - - return false; - } - - @Override - public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int i) - { - return false; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int getRenderType() - { - return RenderIds.RENDER_PILLAR_INSERT; - } - - @Override - public int getRenderBlockPass(){ - return 1; - } - - @Override - public boolean renderAsNormalBlock() - { - return false; - } - + @Override public TileEntity createNewTileEntity(World world) { return new TileEntityPillarInsert(); } - -} + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public int getRenderType() { + return RenderIds.RENDER_PILLAR_INSERT; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) { + if (world.isRemote) { + if (Item.enderPearl.itemID == entityPlayer.inventory.getCurrentItem().itemID) { + TileEntity te = world.getBlockTileEntity(x, y, z); + } + } + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int i) { + return false; + } +} diff --git a/common/MysticWorld/Blocks/BlockPillarPlatform.java b/common/MysticWorld/Blocks/BlockPillarPlatform.java index 5269e4e..cac0fdb 100644 --- a/common/MysticWorld/Blocks/BlockPillarPlatform.java +++ b/common/MysticWorld/Blocks/BlockPillarPlatform.java @@ -1,18 +1,14 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; import java.util.Random; -import MysticWorld.MysticWorld; - +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class BlockPillarPlatform extends Block { - public BlockPillarPlatform(int id) { super(id, Material.rock); this.setBlockUnbreakable(); @@ -21,64 +17,53 @@ public class BlockPillarPlatform extends Block { setCreativeTab(MysticWorld.MysticWorldTab); setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F); } - - public boolean renderAsNormalBlock() - { - return false; - } - - public boolean isOpaqueCube() - { - return false; - } - public int tickRate(World par1World) - { - return 30; - } - - public void randomDisplayTick(World world, int x, int y, int z, Random rand) - { - double posX = (double)x; - double posY = (double)y; - double posZ = (double)z; - - if (this.isTowersNearby(world, x, y, z)) - { - MysticWorld.proxy.fireFX(world, posX + rand.nextDouble(), posY + 0.20, posZ + rand.nextDouble(), 1.0F); - } - } - - public void updateTick(World world, int x, int y, int z, Random random) - { - if (this.isTowersNearby(world, x, y, z)) - { - - } - } - - public void onEntityWalking(World world, int x, int y, int z, Entity entity) - { - if (this.isTowersNearby(world, x, y, z)) - { + @Override + public boolean isOpaqueCube() { + return false; + } - - super.onEntityWalking(world, x, y, z, entity); - } - } - - private boolean isTowersNearby(World world, int x, int y, int z) - { - int block = BlockHandler.pillar.blockID; - - if (world.getBlockId(x - 2, y, z - 2) == block && world.getBlockId(x - 2, y, z + 2) == block && world.getBlockId(x + 2, y, z + 2) == block && world.getBlockId(x + 2, y, z - 2) == block - && world.getBlockId(x - 2, y + 1, z - 2) == block && world.getBlockId(x - 2, y + 1, z + 2) == block && world.getBlockId(x + 2, y + 1, z + 2) == block && world.getBlockId(x + 2, y + 1, z - 2) == block - && world.getBlockId(x - 2, y + 2, z - 2) == block && world.getBlockId(x - 2, y + 2, z + 2) == block && world.getBlockId(x + 2, y + 2, z + 2) == block && world.getBlockId(x + 2, y + 2, z - 2) == block) - { - return true; - } + @Override + public void onEntityWalking(World world, int x, int y, int z, Entity entity) { + if (this.isTowersNearby(world, x, y, z)) { + super.onEntityWalking(world, x, y, z, entity); + } + } - return false; - } - + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { + double posX = x; + double posY = y; + double posZ = z; + if (this.isTowersNearby(world, x, y, z)) { + MysticWorld.proxy.fireFX(world, posX + rand.nextDouble(), posY + 0.20, posZ + rand.nextDouble(), 1.0F); + } + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public int tickRate(World par1World) { + return 30; + } + + @Override + public void updateTick(World world, int x, int y, int z, Random random) { + if (this.isTowersNearby(world, x, y, z)) { + } + } + + private boolean isTowersNearby(World world, int x, int y, int z) { + int block = BlockHandler.pillar.blockID; + if (world.getBlockId(x - 2, y, z - 2) == block && world.getBlockId(x - 2, y, z + 2) == block && world.getBlockId(x + 2, y, z + 2) == block && world.getBlockId(x + 2, y, z - 2) == block + && world.getBlockId(x - 2, y + 1, z - 2) == block && world.getBlockId(x - 2, y + 1, z + 2) == block && world.getBlockId(x + 2, y + 1, z + 2) == block + && world.getBlockId(x + 2, y + 1, z - 2) == block && world.getBlockId(x - 2, y + 2, z - 2) == block && world.getBlockId(x - 2, y + 2, z + 2) == block + && world.getBlockId(x + 2, y + 2, z + 2) == block && world.getBlockId(x + 2, y + 2, z - 2) == block) { + return true; + } + return false; + } } diff --git a/common/MysticWorld/Blocks/BlockPillarTower.java b/common/MysticWorld/Blocks/BlockPillarTower.java index cc4c272..08103ba 100644 --- a/common/MysticWorld/Blocks/BlockPillarTower.java +++ b/common/MysticWorld/Blocks/BlockPillarTower.java @@ -1,11 +1,10 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class BlockPillarTower extends Block { - public BlockPillarTower(int id) { super(id, Material.rock); setBlockUnbreakable(); @@ -13,15 +12,14 @@ public class BlockPillarTower extends Block { setCreativeTab(MysticWorld.MysticWorldTab); setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F); } - - public boolean renderAsNormalBlock() - { - return false; - } - - public boolean isOpaqueCube() - { - return false; - } + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } } diff --git a/common/MysticWorld/Blocks/BlockPlatform.java b/common/MysticWorld/Blocks/BlockPlatform.java index bf721a2..dcebb63 100644 --- a/common/MysticWorld/Blocks/BlockPlatform.java +++ b/common/MysticWorld/Blocks/BlockPlatform.java @@ -1,23 +1,17 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import MysticWorld.MysticWorld; - +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockPlatform extends Block { - public BlockPlatform(int id) { super(id, Material.rock); this.setBlockUnbreakable(); @@ -26,79 +20,63 @@ public class BlockPlatform extends Block { setCreativeTab(MysticWorld.MysticWorldTab); setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F); } - - @Override - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public void randomDisplayTick(World world, int x, int y, int z, Random rand) - { - int block = BlockHandler.pillar.blockID; - - double posX = (double)x; - double posY = (double)y; - double posZ = (double)z; - - if (this.isTowersNearby(world, x, y, z)) - { - MysticWorld.proxy.fireFX(world, posX + rand.nextDouble(), posY + 0.20, posZ + rand.nextDouble(), 1.0F); - - if (rand.nextInt(3) == 0) - { - world.spawnParticle("enchantmenttable", (double)x + 0.5D, (double)y + 1.0D, (double)z + 0.5D, (double)((float)(x - 2 - x) + rand.nextFloat()) - 0.5D, (double)((float)(y + 2 - y) - rand.nextFloat() - 1.0F), (double)((float)(z - 2 - z) + rand.nextFloat()) - 0.5D); - world.spawnParticle("enchantmenttable", (double)x + 0.5D, (double)y + 1.0D, (double)z + 0.5D, (double)((float)(x - 2 - x) + rand.nextFloat()) - 0.5D, (double)((float)(y + 2 - y) - rand.nextFloat() - 1.0F), (double)((float)(z + 2 - z) + rand.nextFloat()) - 0.5D); - world.spawnParticle("enchantmenttable", (double)x + 0.5D, (double)y + 1.0D, (double)z + 0.5D, (double)((float)(x + 2 - x) + rand.nextFloat()) - 0.5D, (double)((float)(y + 2 - y) - rand.nextFloat() - 1.0F), (double)((float)(z + 2 - z) + rand.nextFloat()) - 0.5D); - world.spawnParticle("enchantmenttable", (double)x + 0.5D, (double)y + 1.0D, (double)z + 0.5D, (double)((float)(x + 2 - x) + rand.nextFloat()) - 0.5D, (double)((float)(y + 2 - y) - rand.nextFloat() - 1.0F), (double)((float)(z - 2 - z) + rand.nextFloat()) - 0.5D); - } - } - } - - @Override - public void updateTick(World world, int x, int y, int z, Random random) - { - } - - @Override - public int tickRate(World par1World) - { - return 30; - } - - @Override - public void onEntityWalking(World world, int x, int y, int z, Entity entity) - { - super.onEntityWalking(world, x, y, z, entity); - } - - private boolean isTowersNearby(World world, int x, int y, int z) - { - int pillar = BlockHandler.pillar.blockID; - int insert = BlockHandler.pillarInsert.blockID; - - if (world.getBlockId(x - 2, y, z - 2) == pillar && world.getBlockId(x - 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z - 2) == pillar - && world.getBlockId(x - 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 1, z + 2) == insert && world.getBlockId(x + 2, y + 1, z + 2) == insert && world.getBlockId(x + 2, y + 1, z - 2) == insert - && world.getBlockId(x - 2, y + 2, z - 2) == pillar && world.getBlockId(x - 2, y + 2, z + 2) == pillar && world.getBlockId(x + 2, y + 2, z + 2) == pillar && world.getBlockId(x + 2, y + 2, z - 2) == pillar) - { - return true; - } - return false; - } - + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public void onEntityWalking(World world, int x, int y, int z, Entity entity) { + super.onEntityWalking(world, x, y, z, entity); + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { + int block = BlockHandler.pillar.blockID; + double posX = x; + double posY = y; + double posZ = z; + if (this.isTowersNearby(world, x, y, z)) { + MysticWorld.proxy.fireFX(world, posX + rand.nextDouble(), posY + 0.20, posZ + rand.nextDouble(), 1.0F); + if (rand.nextInt(3) == 0) { + world.spawnParticle("enchantmenttable", x + 0.5D, y + 1.0D, z + 0.5D, x - 2 - x + rand.nextFloat() - 0.5D, y + 2 - y - rand.nextFloat() - 1.0F, z - 2 - z + rand.nextFloat() - 0.5D); + world.spawnParticle("enchantmenttable", x + 0.5D, y + 1.0D, z + 0.5D, x - 2 - x + rand.nextFloat() - 0.5D, y + 2 - y - rand.nextFloat() - 1.0F, z + 2 - z + rand.nextFloat() - 0.5D); + world.spawnParticle("enchantmenttable", x + 0.5D, y + 1.0D, z + 0.5D, x + 2 - x + rand.nextFloat() - 0.5D, y + 2 - y - rand.nextFloat() - 1.0F, z + 2 - z + rand.nextFloat() - 0.5D); + world.spawnParticle("enchantmenttable", x + 0.5D, y + 1.0D, z + 0.5D, x + 2 - x + rand.nextFloat() - 0.5D, y + 2 - y - rand.nextFloat() - 1.0F, z - 2 - z + rand.nextFloat() - 0.5D); + } + } + } + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("MysticMods" + ":" + "Platform"); } - + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public int tickRate(World par1World) { + return 30; + } + + @Override + public void updateTick(World world, int x, int y, int z, Random random) { + } + + private boolean isTowersNearby(World world, int x, int y, int z) { + int pillar = BlockHandler.pillar.blockID; + int insert = BlockHandler.pillarInsert.blockID; + if (world.getBlockId(x - 2, y, z - 2) == pillar && world.getBlockId(x - 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z - 2) == pillar + && world.getBlockId(x - 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 1, z + 2) == insert && world.getBlockId(x + 2, y + 1, z + 2) == insert + && world.getBlockId(x + 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 2, z - 2) == pillar && world.getBlockId(x - 2, y + 2, z + 2) == pillar + && world.getBlockId(x + 2, y + 2, z + 2) == pillar && world.getBlockId(x + 2, y + 2, z - 2) == pillar) { + return true; + } + return false; + } } diff --git a/common/MysticWorld/Blocks/ItemBush.java b/common/MysticWorld/Blocks/ItemBush.java index d75cbbd..c7118e2 100644 --- a/common/MysticWorld/Blocks/ItemBush.java +++ b/common/MysticWorld/Blocks/ItemBush.java @@ -1,46 +1,38 @@ -package MysticWorld.Blocks; - -import java.util.List; - -import MysticWorld.Lib.Strings; - - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +package mysticworld.blocks; +import mysticworld.lib.Strings; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemBush extends ItemBlock { + public static String[] BUSH_TYPES = new String[] { Strings.BUSH_NAME, Strings.POISON_BUSH_NAME, Strings.WEAKNESS_BUSH_NAME, Strings.SLOWNESS_BUSH_NAME, Strings.HARMING_BUSH_NAME, + Strings.WITHER_BUSH_NAME, Strings.HEALTH_BUSH_NAME, Strings.SPEED_BUSH_NAME, Strings.FIRE_RESISTANCE_BUSH_NAME, Strings.REGEN_BUSH_NAME, Strings.NIGHT_VISION_BUSH_NAME, + Strings.INVISIBILITY_BUSH_NAME }; - public static String[] BUSH_TYPES = new String[] {Strings.BUSH_NAME, Strings.POISON_BUSH_NAME, Strings.WEAKNESS_BUSH_NAME, Strings.SLOWNESS_BUSH_NAME, - Strings.HARMING_BUSH_NAME, Strings.WITHER_BUSH_NAME, Strings.HEALTH_BUSH_NAME, Strings.SPEED_BUSH_NAME, Strings.FIRE_RESISTANCE_BUSH_NAME, - Strings.REGEN_BUSH_NAME, Strings.NIGHT_VISION_BUSH_NAME, Strings.INVISIBILITY_BUSH_NAME}; - public ItemBush(int par1) { super(par1); - setMaxDamage(0); - setHasSubtypes(true); + setMaxDamage(0); + setHasSubtypes(true); } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BUSH_TYPES.length); - return BUSH_TYPES[meta]; - } - - - public int getMetadata(int par1) - { - return par1; - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return BlockHandler.bush.getIcon(2, par1); - } + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) { + return BlockHandler.bush.getIcon(2, par1); + } + + @Override + public int getMetadata(int par1) { + return par1; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BUSH_TYPES.length); + return BUSH_TYPES[meta]; + } } diff --git a/common/MysticWorld/Blocks/ItemImbuedStone.java b/common/MysticWorld/Blocks/ItemImbuedStone.java index fb54fc7..7453aa1 100644 --- a/common/MysticWorld/Blocks/ItemImbuedStone.java +++ b/common/MysticWorld/Blocks/ItemImbuedStone.java @@ -1,4 +1,4 @@ -package MysticWorld.Blocks; +package mysticworld.blocks; import java.util.List; diff --git a/common/MysticWorld/Client/ClientProxy.java b/common/MysticWorld/Client/ClientProxy.java index 607c1ef..d26596d 100644 --- a/common/MysticWorld/Client/ClientProxy.java +++ b/common/MysticWorld/Client/ClientProxy.java @@ -1,121 +1,106 @@ -package MysticWorld.Client; +package mysticworld.client; +import mysticworld.blocks.BlockHandler; +import mysticworld.client.fx.LightCubeFX; +import mysticworld.client.fx.PowerAirFX; +import mysticworld.client.fx.PowerEarthFX; +import mysticworld.client.fx.PowerEnergyFX; +import mysticworld.client.fx.PowerFireFX; +import mysticworld.client.fx.PowerWaterFX; +import mysticworld.entity.EntityChargeAir; +import mysticworld.entity.EntityChargeEarth; +import mysticworld.entity.EntityChargeEnergy; +import mysticworld.entity.EntityChargeFire; +import mysticworld.entity.EntityChargeWater; +import mysticworld.items.ItemHandler$1; +import mysticworld.lib.RenderIds; +import mysticworld.renderer.BlockPillarInsertRenderer; +import mysticworld.renderer.ItemOrbAirRenderer; +import mysticworld.renderer.ItemOrbEarthRenderer; +import mysticworld.renderer.ItemOrbEnergyRenderer; +import mysticworld.renderer.ItemOrbFireRenderer; +import mysticworld.renderer.ItemOrbWaterRenderer; +import mysticworld.renderer.ItemStaffAirRenderer; +import mysticworld.renderer.ItemStaffEarthRenderer; +import mysticworld.renderer.ItemStaffEnergyRenderer; +import mysticworld.renderer.ItemStaffFireRenderer; +import mysticworld.renderer.ItemStaffWaterRenderer; +import mysticworld.renderer.RenderStaffPower; +import mysticworld.renderer.TileEntityPillarInsertRenderer; +import mysticworld.tiles.TileEntityPillarInsert; +import mysticworld.util.CommonProxy; import net.minecraft.src.ModLoader; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Client.FX.LightCubeFX; -import MysticWorld.Client.FX.PowerAirFX; -import MysticWorld.Client.FX.PowerEarthFX; -import MysticWorld.Client.FX.PowerEnergyFX; -import MysticWorld.Client.FX.PowerFireFX; -import MysticWorld.Client.FX.PowerWaterFX; -import MysticWorld.Entity.EntityChargeAir; -import MysticWorld.Entity.EntityChargeEarth; -import MysticWorld.Entity.EntityChargeEnergy; -import MysticWorld.Entity.EntityChargeFire; -import MysticWorld.Entity.EntityChargeWater; -import MysticWorld.Items.ItemHandler$1; -import MysticWorld.Lib.RenderIds; -import MysticWorld.Renderer.BlockPillarInsertRenderer; -import MysticWorld.Renderer.ItemOrbAirRenderer; -import MysticWorld.Renderer.ItemOrbEarthRenderer; -import MysticWorld.Renderer.ItemOrbEnergyRenderer; -import MysticWorld.Renderer.ItemOrbFireRenderer; -import MysticWorld.Renderer.ItemOrbWaterRenderer; -import MysticWorld.Renderer.ItemStaffAirRenderer; -import MysticWorld.Renderer.ItemStaffEarthRenderer; -import MysticWorld.Renderer.ItemStaffEnergyRenderer; -import MysticWorld.Renderer.ItemStaffFireRenderer; -import MysticWorld.Renderer.ItemStaffWaterRenderer; -import MysticWorld.Renderer.RenderStaffPower; -import MysticWorld.Renderer.TileEntityPillarInsertRenderer; -import MysticWorld.TileEntity.TileEntityPillarInsert; -import MysticWorld.Util.CommonProxy; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { - @Override - public void registerRenderIDs() - { + public int addArmor(String armor) { + return RenderingRegistry.addNewArmourRendererPrefix(armor); + } + + //particles + @Override + public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age) { + PowerAirFX airFX = new PowerAirFX(worldObj, x, y, z, scale, age); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(airFX); + } + + @Override + public void earthFX(World worldObj, double x, double y, double z, float scale) { + PowerEarthFX earthFX = new PowerEarthFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(earthFX); + } + + @Override + public void energyFX(World worldObj, double x, double y, double z, float scale) { + PowerEnergyFX energyFX = new PowerEnergyFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(energyFX); + } + + @Override + public void fireFX(World worldObj, double x, double y, double z, float scale) { + PowerFireFX fireFX = new PowerFireFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(fireFX); + } + + @Override + public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) { + LightCubeFX lightCubeFX = new LightCubeFX(worldObj, x, y, z, motionX, motionY, motionZ, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(lightCubeFX); + } + + @Override + public void registerRenderIDs() { RenderIds.RENDER_PILLAR_INSERT = RenderingRegistry.getNextAvailableRenderId(); } - + @Override - public void registerRenders() - { + public void registerRenders() { MinecraftForgeClient.registerItemRenderer(BlockHandler.pillarInsert.blockID, new BlockPillarInsertRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemHandler$1.fireStaff.itemID, new ItemStaffFireRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.earthStaff.itemID, new ItemStaffEarthRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.airStaff.itemID, new ItemStaffAirRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.energyStaff.itemID, new ItemStaffEnergyRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.waterStaff.itemID, new ItemStaffWaterRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemHandler$1.fireOrb.itemID, new ItemOrbFireRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.earthOrb.itemID, new ItemOrbEarthRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.airOrb.itemID, new ItemOrbAirRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.energyOrb.itemID, new ItemOrbEnergyRenderer()); MinecraftForgeClient.registerItemRenderer(ItemHandler$1.waterOrb.itemID, new ItemOrbWaterRenderer()); - RenderingRegistry.registerEntityRenderingHandler(EntityChargeFire.class, new RenderStaffPower(0)); RenderingRegistry.registerEntityRenderingHandler(EntityChargeWater.class, new RenderStaffPower(1)); RenderingRegistry.registerEntityRenderingHandler(EntityChargeEarth.class, new RenderStaffPower(2)); RenderingRegistry.registerEntityRenderingHandler(EntityChargeAir.class, new RenderStaffPower(3)); RenderingRegistry.registerEntityRenderingHandler(EntityChargeEnergy.class, new RenderStaffPower(4)); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPillarInsert.class, new TileEntityPillarInsertRenderer()); } - + @Override - public int addArmor(String armor) - { - return RenderingRegistry.addNewArmourRendererPrefix(armor); - } - - //particles - @Override - public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age) - { - PowerAirFX airFX = new PowerAirFX(worldObj, x, y, z, scale, age); - ModLoader.getMinecraftInstance().effectRenderer.addEffect(airFX); - } - - @Override - public void earthFX(World worldObj, double x, double y, double z, float scale) - { - PowerEarthFX earthFX = new PowerEarthFX(worldObj, x, y, z, scale); - ModLoader.getMinecraftInstance().effectRenderer.addEffect(earthFX); - } - - @Override - public void energyFX(World worldObj, double x, double y, double z, float scale) - { - PowerEnergyFX energyFX = new PowerEnergyFX(worldObj, x, y, z, scale); - ModLoader.getMinecraftInstance().effectRenderer.addEffect(energyFX); - } - - @Override - public void fireFX(World worldObj, double x, double y, double z, float scale) - { - PowerFireFX fireFX = new PowerFireFX(worldObj, x, y, z, scale); - ModLoader.getMinecraftInstance().effectRenderer.addEffect(fireFX); - } - - @Override - public void waterFX(World worldObj, double x, double y, double z, float scale) - { + public void waterFX(World worldObj, double x, double y, double z, float scale) { PowerWaterFX waterFX = new PowerWaterFX(worldObj, x, y, z, scale); ModLoader.getMinecraftInstance().effectRenderer.addEffect(waterFX); } - - @Override - public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) - { - LightCubeFX lightCubeFX = new LightCubeFX(worldObj, x, y, z, motionX, motionY, motionZ, scale); - ModLoader.getMinecraftInstance().effectRenderer.addEffect(lightCubeFX); - } - } diff --git a/common/MysticWorld/Client/FX/LightCubeFX.java b/common/MysticWorld/Client/FX/LightCubeFX.java index 7731d41..27afd94 100644 --- a/common/MysticWorld/Client/FX/LightCubeFX.java +++ b/common/MysticWorld/Client/FX/LightCubeFX.java @@ -1,102 +1,83 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + public class LightCubeFX extends EntityFX { - - public LightCubeFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public LightCubeFX(World world, double x, double y, double z) { + super(world, x, y, z); + } - public LightCubeFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float scale){ - super(world, x, y, z); - this.motionX *= 0.10000000149011612D; - this.motionY *= 0.10000000149011612D; - this.motionZ *= 0.10000000149011612D; - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = rand.nextInt(25); - } + public LightCubeFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) { + super(world, x, y, z); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = rand.nextInt(25); + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/lightCubeFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/lightCubeFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } diff --git a/common/MysticWorld/Client/FX/PowerAirFX.java b/common/MysticWorld/Client/FX/PowerAirFX.java index 896b0f4..392f391 100644 --- a/common/MysticWorld/Client/FX/PowerAirFX.java +++ b/common/MysticWorld/Client/FX/PowerAirFX.java @@ -1,126 +1,103 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.src.ModLoader; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +public class PowerAirFX extends EntityFX { + public PowerAirFX(World world, double x, double y, double z) { + super(world, x, y, z); + } -public class PowerAirFX extends EntityFX -{ - public PowerAirFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public PowerAirFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float rotPitch, float rotYaw) { + super(world, x, y, z); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = 1.0F; + this.noClip = true; + this.particleMaxAge = 120; + this.rotationPitch = rotPitch; + this.rotationYaw = rotYaw; + } - public PowerAirFX(World world, double x, double y, double z, float scale, int age){ - super(world, x, y, z); - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.motionX *= 0.019999999552965164D; - this.motionY *= 0.019999999552965164D; - this.motionZ *= 0.019999999552965164D; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = age; - } - - public PowerAirFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float rotPitch, float rotYaw){ - super(world, x, y, z); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = 1.0F; - this.noClip = true; - this.particleMaxAge = 120; - this.rotationPitch = rotPitch; - this.rotationYaw = rotYaw; - } + public PowerAirFX(World world, double x, double y, double z, float scale, int age) { + super(world, x, y, z); + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = age; + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + this.setPosition(this.posX, this.posY, this.posZ); + } - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - this.setPosition(this.posX, this.posY, this.posZ); - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/airFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/airFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } \ No newline at end of file diff --git a/common/MysticWorld/Client/FX/PowerEarthFX.java b/common/MysticWorld/Client/FX/PowerEarthFX.java index e5db0c3..c319c31 100644 --- a/common/MysticWorld/Client/FX/PowerEarthFX.java +++ b/common/MysticWorld/Client/FX/PowerEarthFX.java @@ -1,104 +1,83 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.src.ModLoader; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +public class PowerEarthFX extends EntityFX { + public PowerEarthFX(World world, double x, double y, double z) { + super(world, x, y, z); + } -public class PowerEarthFX extends EntityFX -{ - public PowerEarthFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public PowerEarthFX(World world, double x, double y, double z, float scale) { + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } - public PowerEarthFX(World world, double x, double y, double z, float scale){ - super(world, x, y, z); - this.motionX *= 0.019999999552965164D; - this.motionY *= 0.019999999552965164D; - this.motionZ *= 0.019999999552965164D; - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = 15; - } + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/earthFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/earthFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } diff --git a/common/MysticWorld/Client/FX/PowerEnergyFX.java b/common/MysticWorld/Client/FX/PowerEnergyFX.java index d8feffa..6df6bde 100644 --- a/common/MysticWorld/Client/FX/PowerEnergyFX.java +++ b/common/MysticWorld/Client/FX/PowerEnergyFX.java @@ -1,104 +1,83 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.src.ModLoader; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +public class PowerEnergyFX extends EntityFX { + public PowerEnergyFX(World world, double x, double y, double z) { + super(world, x, y, z); + } -public class PowerEnergyFX extends EntityFX -{ - public PowerEnergyFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public PowerEnergyFX(World world, double x, double y, double z, float scale) { + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } - public PowerEnergyFX(World world, double x, double y, double z, float scale){ - super(world, x, y, z); - this.motionX *= 0.019999999552965164D; - this.motionY *= 0.019999999552965164D; - this.motionZ *= 0.019999999552965164D; - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = 15; - } + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/energyFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/energyFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } diff --git a/common/MysticWorld/Client/FX/PowerFireFX.java b/common/MysticWorld/Client/FX/PowerFireFX.java index 1be09e7..1ebdb17 100644 --- a/common/MysticWorld/Client/FX/PowerFireFX.java +++ b/common/MysticWorld/Client/FX/PowerFireFX.java @@ -1,105 +1,83 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.src.ModLoader; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +public class PowerFireFX extends EntityFX { + public PowerFireFX(World world, double x, double y, double z) { + super(world, x, y, z); + } -public class PowerFireFX extends EntityFX -{ - public PowerFireFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public PowerFireFX(World world, double x, double y, double z, float scale) { + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } - public PowerFireFX(World world, double x, double y, double z, float scale){ - super(world, x, y, z); - this.motionX *= 0.019999999552965164D; - this.motionY *= 0.019999999552965164D; - this.motionZ *= 0.019999999552965164D; - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = 15; - } + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/fireFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/fireFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } - diff --git a/common/MysticWorld/Client/FX/PowerWaterFX.java b/common/MysticWorld/Client/FX/PowerWaterFX.java index be53c52..a8917de 100644 --- a/common/MysticWorld/Client/FX/PowerWaterFX.java +++ b/common/MysticWorld/Client/FX/PowerWaterFX.java @@ -1,104 +1,83 @@ -package MysticWorld.Client.FX; +package mysticworld.client.fx; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.src.ModLoader; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +public class PowerWaterFX extends EntityFX { + public PowerWaterFX(World world, double x, double y, double z) { + super(world, x, y, z); + } -public class PowerWaterFX extends EntityFX -{ - public PowerWaterFX(World world, double x, double y, double z) - { - super(world, x, y, z); - } + public PowerWaterFX(World world, double x, double y, double z, float scale) { + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.motionX += motionX; + this.motionY += motionY; + this.motionZ += motionZ; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } - public PowerWaterFX(World world, double x, double y, double z, float scale){ - super(world, x, y, z); - this.motionX *= 0.019999999552965164D; - this.motionY *= 0.019999999552965164D; - this.motionZ *= 0.019999999552965164D; - this.motionX += motionX; - this.motionY += motionY; - this.motionZ += motionZ; - this.particleRed = 1.0F; - this.particleGreen = 1.0F; - this.particleBlue = 1.0F; - this.particleScale = scale; - this.noClip = true; - this.particleMaxAge = 15; - } + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + if (this.particleAge++ >= this.particleMaxAge) { + this.setDead(); + } + this.motionY += 0.004D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + if (this.posY == this.prevPosY) { + this.motionX *= 1.1D; + this.motionZ *= 1.1D; + } + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if (this.particleAge++ >= this.particleMaxAge) - { - this.setDead(); - } - - this.motionY += 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - - if (this.posY == this.prevPosY) - { - this.motionX *= 1.1D; - this.motionZ *= 1.1D; - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) - { - tessellator.draw(); - - GL11.glPushMatrix(); - GL11.glDepthMask(false); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 1); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/waterFX.png")); - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); - - float scale = 0.1F * this.particleScale; - float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); - float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); - float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); - - tessellator.startDrawingQuads(); - tessellator.setBrightness(240); - - tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); - - tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); - tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); - tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); - - tessellator.draw(); - - GL11.glDisable(3042); - GL11.glDepthMask(true); - GL11.glPopMatrix(); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); - tessellator.startDrawingQuads(); - } + @Override + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { + tessellator.draw(); + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/waterFX.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ); + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D); + tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D); + tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D); + tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D); + tessellator.draw(); + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + tessellator.startDrawingQuads(); + } } diff --git a/common/MysticWorld/Entity/EntityChargeAir.java b/common/MysticWorld/Entity/EntityChargeAir.java index 81982a6..4ee9183 100644 --- a/common/MysticWorld/Entity/EntityChargeAir.java +++ b/common/MysticWorld/Entity/EntityChargeAir.java @@ -1,214 +1,176 @@ -package MysticWorld.Entity; +package mysticworld.entity; import java.util.List; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; +import mysticworld.MysticWorld; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.boss.EntityDragon; -import net.minecraft.entity.boss.EntityWither; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.item.Item; -import net.minecraft.item.ItemDye; -import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.FakePlayerFactory; -import net.minecraftforge.common.ForgeHooks; - -import MysticWorld.MysticWorld; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityChargeAir extends Entity { - public EntityPlayer shootingEntity; - private boolean inGround = false; - private int xTile = -1; - private int yTile = -1; - private int zTile = -1; + private int yTile = -1; + private int zTile = -1; private int inTile = 0; private int ticksAlive; - private int ticksInAir = 0; - - private float particleScale = 1.0f; - - private double powerHeight = 0.75D; - - public EntityChargeAir(World par1World) - { + private int ticksInAir = 0; + private float particleScale = 1.0f; + private double powerHeight = 0.75D; + + public EntityChargeAir(World par1World) { super(par1World); } - - public EntityChargeAir(World par1World, EntityPlayer par2EntityPlayer, float pScale, double pHeight) - { - super(par1World); - this.setSize(0.25F, 0.25F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - this.setPosition(this.posX, this.posY, this.posZ); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.shootingEntity = par2EntityPlayer; - this.particleScale = pScale; - this.powerHeight = pHeight; - } - public void onUpdate() - { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) - { - this.setDead(); - } - else - { - super.onUpdate(); - - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + public EntityChargeAir(World par1World, EntityPlayer par2EntityPlayer, float pScale, double pHeight) { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.shootingEntity = par2EntityPlayer; + this.particleScale = pScale; + this.powerHeight = pHeight; + } - if (movingobjectposition != null) - { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; + @Override + public float getBrightness(float par1) { + return 1.0F; + } - for (int j = 0; j < list.size(); ++j) - { - Entity entity1 = (Entity)list.get(j); + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) { + return 15728880; + } - if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) - { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + @Override + public float getCollisionBorderSize() { + return 1.0F; + } - if (movingobjectposition1 != null) - { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int) this.posX, (int) this.posY, (int) this.posZ))) { + this.setDead(); + } else { + super.onUpdate(); + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + for (int j = 0; j < list.size(); ++j) { + Entity entity1 = (Entity) list.get(j); + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f2 = this.getMotionFactor(); + if (this.isInWater()) { + for (int k = 0; k < 4; ++k) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f3, this.posY - this.motionY * f3, this.posZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + f2 = 0.8F; + } + MysticWorld.proxy.airFeetFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), particleScale, 15); + MysticWorld.proxy.airFeetFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), particleScale, 15); + this.setPosition(this.posX, this.posY, this.posZ); + } + } - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) - { - this.onImpact(movingobjectposition); - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - float f2 = this.getMotionFactor(); - - if (this.isInWater()) - { - for (int k = 0; k < 4; ++k) - { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - MysticWorld.proxy.airFeetFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), particleScale, 15); - MysticWorld.proxy.airFeetFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), particleScale, 15); - - this.setPosition(this.posX, this.posY, this.posZ); - } - } - - protected float getMotionFactor() - { - return 0.95F; - } - - protected void onImpact(MovingObjectPosition par1MovingObjectPosition) - { - Random rand = new Random(); - - if (!this.worldObj.isRemote) - { - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); - - if (par1MovingObjectPosition.entityHit != null) - { - double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f3 > 0.0F) - { - par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)2 * 0.6000000238418579D / (double)f3, 1.0D + powerHeight, this.motionZ * (double)2 * 0.6000000238418579D / (double)f3); - } - } - else - { - int i = par1MovingObjectPosition.blockX; - int j = par1MovingObjectPosition.blockY; - int k = par1MovingObjectPosition.blockZ; - - switch (par1MovingObjectPosition.sideHit) - { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - } - - this.setDead(); - } - } - @Override protected void entityInit() { } - + + protected float getMotionFactor() { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { + Random rand = new Random(); + if (!this.worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + if (par1MovingObjectPosition.entityHit != null) { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (f3 > 0.0F) { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 2 * 0.6000000238418579D / f3, 1.0D + powerHeight, this.motionZ * 2 * 0.6000000238418579D / f3); + } + } else { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + switch (par1MovingObjectPosition.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + this.setDead(); + } + } + @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { } @@ -216,31 +178,4 @@ public class EntityChargeAir extends Entity { @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { } - - public boolean canBeCollidedWith() - { - return true; - } - - public float getCollisionBorderSize() - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public float getBrightness(float par1) - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float par1) - { - return 15728880; - } } \ No newline at end of file diff --git a/common/MysticWorld/Entity/EntityChargeEarth.java b/common/MysticWorld/Entity/EntityChargeEarth.java index 5a83310..3326ce3 100644 --- a/common/MysticWorld/Entity/EntityChargeEarth.java +++ b/common/MysticWorld/Entity/EntityChargeEarth.java @@ -1,27 +1,16 @@ -package MysticWorld.Entity; +package mysticworld.entity; import java.util.List; import java.util.Random; -import MysticWorld.MysticWorld; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.IProjectile; import net.minecraft.entity.boss.EntityDragon; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.item.Item; -import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; @@ -30,190 +19,173 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.FakePlayerFactory; -import net.minecraftforge.common.ForgeHooks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityChargeEarth extends Entity { - public EntityPlayer shootingEntity; public EntityPlayer entityPlayer; public EntityDragon entityDragon; public EntityWither entityWither; private boolean inGround = false; private int xTile = -1; - private int yTile = -1; - private int zTile = -1; + private int yTile = -1; + private int zTile = -1; private int inTile = 0; private int ticksAlive; - private int ticksInAir = 0; - - public EntityChargeEarth(World par1World) - { + private int ticksInAir = 0; + + public EntityChargeEarth(World par1World) { super(par1World); } - - public EntityChargeEarth(World par1World, EntityPlayer par2EntityPlayer) - { - super(par1World); - this.setSize(0.25F, 0.25F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - this.setPosition(this.posX, this.posY, this.posZ); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.shootingEntity = par2EntityPlayer; - } - public void onUpdate() - { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) - { - this.setDead(); - } - else - { - super.onUpdate(); - - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + public EntityChargeEarth(World par1World, EntityPlayer par2EntityPlayer) { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.shootingEntity = par2EntityPlayer; + } - if (movingobjectposition != null) - { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; + @Override + public float getBrightness(float par1) { + return 1.0F; + } - for (int j = 0; j < list.size(); ++j) - { - Entity entity1 = (Entity)list.get(j); + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) { + return 15728880; + } - if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) - { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + @Override + public float getCollisionBorderSize() { + return 1.0F; + } - if (movingobjectposition1 != null) - { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int) this.posX, (int) this.posY, (int) this.posZ))) { + this.setDead(); + } else { + super.onUpdate(); + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + for (int j = 0; j < list.size(); ++j) { + Entity entity1 = (Entity) list.get(j); + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f2 = this.getMotionFactor(); + if (this.isInWater()) { + for (int k = 0; k < 4; ++k) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f3, this.posY - this.motionY * f3, this.posZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + f2 = 0.8F; + } + MysticWorld.proxy.earthFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) - { - this.onImpact(movingobjectposition); - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - float f2 = this.getMotionFactor(); - - if (this.isInWater()) - { - for (int k = 0; k < 4; ++k) - { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - MysticWorld.proxy.earthFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), 1.0F); - this.setPosition(this.posX, this.posY, this.posZ); - } - } - - protected float getMotionFactor() - { - return 0.95F; - } - - protected void onImpact(MovingObjectPosition par1MovingObjectPosition) - { - Random rand = new Random(); - - if (!this.worldObj.isRemote) - { - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); - - if (par1MovingObjectPosition.entityHit != null) - { - double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f3 > 0.0F) - { - par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); - } - - par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); - - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.seeds, rand.nextInt(4)))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.mushroomBrown, rand.nextInt(2)))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.appleRed, rand.nextInt(2)))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 0))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.pumpkinSeeds, rand.nextInt(2)))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 1))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 2))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 3))); - this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.melonSeeds, rand.nextInt(3)))); - } - else - { - int i = par1MovingObjectPosition.blockX; - int j = par1MovingObjectPosition.blockY; - int k = par1MovingObjectPosition.blockZ; - - switch (par1MovingObjectPosition.sideHit) - { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - } - - this.setDead(); - } - } - @Override protected void entityInit() { } - + + protected float getMotionFactor() { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { + Random rand = new Random(); + if (!this.worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + if (par1MovingObjectPosition.entityHit != null) { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (f3 > 0.0F) { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 1 * 0.6000000238418579D / f3, 0.1D, this.motionZ * 1 * 0.6000000238418579D / f3); + } + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.seeds, rand.nextInt(4)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.mushroomBrown, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.appleRed, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 0))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.pumpkinSeeds, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 1))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 2))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 3))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.melonSeeds, rand.nextInt(3)))); + } else { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + switch (par1MovingObjectPosition.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + this.setDead(); + } + } + @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { } @@ -221,31 +193,4 @@ public class EntityChargeEarth extends Entity { @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { } - - public boolean canBeCollidedWith() - { - return true; - } - - public float getCollisionBorderSize() - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public float getBrightness(float par1) - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float par1) - { - return 15728880; - } } diff --git a/common/MysticWorld/Entity/EntityChargeEnergy.java b/common/MysticWorld/Entity/EntityChargeEnergy.java index 61ff680..20a5935 100644 --- a/common/MysticWorld/Entity/EntityChargeEnergy.java +++ b/common/MysticWorld/Entity/EntityChargeEnergy.java @@ -1,197 +1,171 @@ -package MysticWorld.Entity; +package mysticworld.entity; import java.util.List; -import MysticWorld.MysticWorld; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; +import mysticworld.MysticWorld; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.IProjectile; import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityChargeEnergy extends Entity { - public EntityPlayer shootingEntity; private boolean inGround = false; private int xTile = -1; - private int yTile = -1; - private int zTile = -1; + private int yTile = -1; + private int zTile = -1; private int inTile = 0; private int ticksAlive; - private int ticksInAir = 0; - - public EntityChargeEnergy(World par1World) - { + private int ticksInAir = 0; + + public EntityChargeEnergy(World par1World) { super(par1World); } - - public EntityChargeEnergy(World par1World, EntityPlayer par2EntityPlayer) - { - super(par1World); - this.setSize(0.25F, 0.25F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - this.setPosition(this.posX, this.posY, this.posZ); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.shootingEntity = par2EntityPlayer; - } - public void onUpdate() - { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) - { - this.setDead(); - } - else - { - super.onUpdate(); - - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + public EntityChargeEnergy(World par1World, EntityPlayer par2EntityPlayer) { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.shootingEntity = par2EntityPlayer; + } - if (movingobjectposition != null) - { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; + @Override + public float getBrightness(float par1) { + return 1.0F; + } - for (int j = 0; j < list.size(); ++j) - { - Entity entity1 = (Entity)list.get(j); + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) { + return 15728880; + } - if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) - { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + @Override + public float getCollisionBorderSize() { + return 1.0F; + } - if (movingobjectposition1 != null) - { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int) this.posX, (int) this.posY, (int) this.posZ))) { + this.setDead(); + } else { + super.onUpdate(); + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + for (int j = 0; j < list.size(); ++j) { + Entity entity1 = (Entity) list.get(j); + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f2 = this.getMotionFactor(); + if (this.isInWater()) { + for (int k = 0; k < 4; ++k) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f3, this.posY - this.motionY * f3, this.posZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + f2 = 0.8F; + } + MysticWorld.proxy.energyFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) - { - this.onImpact(movingobjectposition); - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - float f2 = this.getMotionFactor(); - - if (this.isInWater()) - { - for (int k = 0; k < 4; ++k) - { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - MysticWorld.proxy.energyFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), 1.0F); - this.setPosition(this.posX, this.posY, this.posZ); - } - } - - protected float getMotionFactor() - { - return 0.95F; - } - - protected void onImpact(MovingObjectPosition par1MovingObjectPosition) - { - int i = par1MovingObjectPosition.blockX; - int j = par1MovingObjectPosition.blockY; - int k = par1MovingObjectPosition.blockZ; - - if (!this.worldObj.isRemote) - { - if (par1MovingObjectPosition.entityHit != null) - { - double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f3 > 0.0F) - { - par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); - } - - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, par1MovingObjectPosition.entityHit.posX, par1MovingObjectPosition.entityHit.posY, par1MovingObjectPosition.entityHit.posZ)); - } - else - { - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, i, j, k)); - - switch (par1MovingObjectPosition.sideHit) - { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - } - - this.setDead(); - } - } - @Override protected void entityInit() { } - + + protected float getMotionFactor() { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + if (!this.worldObj.isRemote) { + if (par1MovingObjectPosition.entityHit != null) { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (f3 > 0.0F) { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 1 * 0.6000000238418579D / f3, 0.1D, this.motionZ * 1 * 0.6000000238418579D / f3); + } + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, par1MovingObjectPosition.entityHit.posX, par1MovingObjectPosition.entityHit.posY, par1MovingObjectPosition.entityHit.posZ)); + } else { + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, i, j, k)); + switch (par1MovingObjectPosition.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + this.setDead(); + } + } + @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { } @@ -199,32 +173,4 @@ public class EntityChargeEnergy extends Entity { @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { } - - public boolean canBeCollidedWith() - { - return true; - } - - public float getCollisionBorderSize() - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public float getBrightness(float par1) - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float par1) - { - return 15728880; - } - } \ No newline at end of file diff --git a/common/MysticWorld/Entity/EntityChargeFire.java b/common/MysticWorld/Entity/EntityChargeFire.java index 6615416..a58a2d1 100644 --- a/common/MysticWorld/Entity/EntityChargeFire.java +++ b/common/MysticWorld/Entity/EntityChargeFire.java @@ -1,22 +1,11 @@ -package MysticWorld.Entity; +package mysticworld.entity; import java.util.List; -import MysticWorld.MysticWorld; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; @@ -24,183 +13,166 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityChargeFire extends Entity { - public EntityPlayer shootingEntity; private boolean inGround = false; private int xTile = -1; - private int yTile = -1; - private int zTile = -1; + private int yTile = -1; + private int zTile = -1; private int inTile = 0; private int ticksAlive; - private int ticksInAir = 0; - - public EntityChargeFire(World par1World) - { + private int ticksInAir = 0; + + public EntityChargeFire(World par1World) { super(par1World); } - - public EntityChargeFire(World par1World, EntityPlayer par2EntityPlayer) - { - super(par1World); - this.setSize(0.25F, 0.25F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - this.setPosition(this.posX, this.posY, this.posZ); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.shootingEntity = par2EntityPlayer; - } - public void onUpdate() - { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) - { - this.setDead(); - } - else - { - super.onUpdate(); - - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + public EntityChargeFire(World par1World, EntityPlayer par2EntityPlayer) { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.shootingEntity = par2EntityPlayer; + } - if (movingobjectposition != null) - { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; + @Override + public float getBrightness(float par1) { + return 1.0F; + } - for (int j = 0; j < list.size(); ++j) - { - Entity entity1 = (Entity)list.get(j); + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) { + return 15728880; + } - if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) - { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + @Override + public float getCollisionBorderSize() { + return 1.0F; + } - if (movingobjectposition1 != null) - { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int) this.posX, (int) this.posY, (int) this.posZ))) { + this.setDead(); + } else { + super.onUpdate(); + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + for (int j = 0; j < list.size(); ++j) { + Entity entity1 = (Entity) list.get(j); + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f2 = this.getMotionFactor(); + if (this.isInWater()) { + for (int k = 0; k < 4; ++k) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f3, this.posY - this.motionY * f3, this.posZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + f2 = 0.8F; + } + MysticWorld.proxy.fireFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) - { - this.onImpact(movingobjectposition); - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - float f2 = this.getMotionFactor(); - - if (this.isInWater()) - { - for (int k = 0; k < 4; ++k) - { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - MysticWorld.proxy.fireFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), 1.0F); - this.setPosition(this.posX, this.posY, this.posZ); - } - } - - protected float getMotionFactor() - { - return 0.95F; - } - - protected void onImpact(MovingObjectPosition par1MovingObjectPosition) - { - if (!this.worldObj.isRemote) - { - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); - - if (par1MovingObjectPosition.entityHit != null) - { - double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f3 > 0.0F) - { - par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); - } - - if (!par1MovingObjectPosition.entityHit.isImmuneToFire()) - { - par1MovingObjectPosition.entityHit.setFire(5); - par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 7); - } - } - else - { - int i = par1MovingObjectPosition.blockX; - int j = par1MovingObjectPosition.blockY; - int k = par1MovingObjectPosition.blockZ; - - switch (par1MovingObjectPosition.sideHit) - { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - - if (this.worldObj.isAirBlock(i, j, k)) - { - this.worldObj.setBlock(i, j, k, Block.fire.blockID); - } - - } - - this.setDead(); - } - } - @Override protected void entityInit() { } - + + protected float getMotionFactor() { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { + if (!this.worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + if (par1MovingObjectPosition.entityHit != null) { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (f3 > 0.0F) { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 1 * 0.6000000238418579D / f3, 0.1D, this.motionZ * 1 * 0.6000000238418579D / f3); + } + if (!par1MovingObjectPosition.entityHit.isImmuneToFire()) { + par1MovingObjectPosition.entityHit.setFire(5); + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 7); + } + } else { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + switch (par1MovingObjectPosition.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + if (this.worldObj.isAirBlock(i, j, k)) { + this.worldObj.setBlock(i, j, k, Block.fire.blockID); + } + } + this.setDead(); + } + } + @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { } @@ -208,32 +180,4 @@ public class EntityChargeFire extends Entity { @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { } - - public boolean canBeCollidedWith() - { - return true; - } - - public float getCollisionBorderSize() - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public float getBrightness(float par1) - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float par1) - { - return 15728880; - } - } diff --git a/common/MysticWorld/Entity/EntityChargeWater.java b/common/MysticWorld/Entity/EntityChargeWater.java index d75498a..b8b24a0 100644 --- a/common/MysticWorld/Entity/EntityChargeWater.java +++ b/common/MysticWorld/Entity/EntityChargeWater.java @@ -1,22 +1,10 @@ -package MysticWorld.Entity; +package mysticworld.entity; import java.util.List; -import MysticWorld.MysticWorld; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; +import mysticworld.MysticWorld; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; @@ -24,181 +12,165 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityChargeWater extends Entity { - public EntityPlayer shootingEntity; private boolean inGround = false; private int xTile = -1; - private int yTile = -1; - private int zTile = -1; + private int yTile = -1; + private int zTile = -1; private int inTile = 0; private int ticksAlive; - private int ticksInAir = 0; - - public EntityChargeWater(World par1World) - { + private int ticksInAir = 0; + + public EntityChargeWater(World par1World) { super(par1World); } - - public EntityChargeWater(World par1World, EntityPlayer par2EntityPlayer) - { - super(par1World); - this.setSize(0.25F, 0.25F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - this.setPosition(this.posX, this.posY, this.posZ); - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.shootingEntity = par2EntityPlayer; - } - public void onUpdate() - { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) - { - this.setDead(); - } - else - { - super.onUpdate(); - - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + public EntityChargeWater(World par1World, EntityPlayer par2EntityPlayer) { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.shootingEntity = par2EntityPlayer; + } - if (movingobjectposition != null) - { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; + @Override + public float getBrightness(float par1) { + return 1.0F; + } - for (int j = 0; j < list.size(); ++j) - { - Entity entity1 = (Entity)list.get(j); + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) { + return 15728880; + } - if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) - { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + @Override + public float getCollisionBorderSize() { + return 1.0F; + } - if (movingobjectposition1 != null) - { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int) this.posX, (int) this.posY, (int) this.posZ))) { + this.setDead(); + } else { + super.onUpdate(); + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + for (int j = 0; j < list.size(); ++j) { + Entity entity1 = (Entity) list.get(j); + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f2 = this.getMotionFactor(); + if (this.isInWater()) { + for (int k = 0; k < 4; ++k) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f3, this.posY - this.motionY * f3, this.posZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + f2 = 0.8F; + } + MysticWorld.proxy.waterFX(this.worldObj, this.posX + (rand.nextDouble() / 2), this.posY + 0.5D, this.posZ + (rand.nextDouble() / 2), 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) - { - this.onImpact(movingobjectposition); - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - - float f2 = this.getMotionFactor(); - - if (this.isInWater()) - { - for (int k = 0; k < 4; ++k) - { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - MysticWorld.proxy.waterFX(this.worldObj, this.posX + (rand.nextDouble()/2), this.posY + 0.5D, this.posZ + (rand.nextDouble()/2), 1.0F); - this.setPosition(this.posX, this.posY, this.posZ); - } - } - - protected float getMotionFactor() - { - return 0.95F; - } - - protected void onImpact(MovingObjectPosition par1MovingObjectPosition) - { - if (!this.worldObj.isRemote) - { - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); - - if (par1MovingObjectPosition.entityHit != null) - { - double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f3 > 0.0F) - { - par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); - } - - if (par1MovingObjectPosition.entityHit.isImmuneToFire()) - { - par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); - } - - if (par1MovingObjectPosition.entityHit.isBurning()) - { - par1MovingObjectPosition.entityHit.extinguish(); - } - } - else - { - int i = par1MovingObjectPosition.blockX; - int j = par1MovingObjectPosition.blockY; - int k = par1MovingObjectPosition.blockZ; - - switch (par1MovingObjectPosition.sideHit) - { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - } - - this.setDead(); - } - } - @Override protected void entityInit() { } - + + protected float getMotionFactor() { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { + if (!this.worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + if (par1MovingObjectPosition.entityHit != null) { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (f3 > 0.0F) { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 1 * 0.6000000238418579D / f3, 0.1D, this.motionZ * 1 * 0.6000000238418579D / f3); + } + if (par1MovingObjectPosition.entityHit.isImmuneToFire()) { + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); + } + if (par1MovingObjectPosition.entityHit.isBurning()) { + par1MovingObjectPosition.entityHit.extinguish(); + } + } else { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + switch (par1MovingObjectPosition.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + this.setDead(); + } + } + @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { } @@ -206,33 +178,4 @@ public class EntityChargeWater extends Entity { @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { } - - public boolean canBeCollidedWith() - { - return true; - } - - public float getCollisionBorderSize() - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public float getBrightness(float par1) - { - return 1.0F; - } - - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float par1) - { - return 15728880; - } - } - diff --git a/common/MysticWorld/Entity/EntityHandler.java b/common/MysticWorld/Entity/EntityHandler.java index 3771b99..b3ea704 100644 --- a/common/MysticWorld/Entity/EntityHandler.java +++ b/common/MysticWorld/Entity/EntityHandler.java @@ -1,20 +1,16 @@ -package MysticWorld.Entity; +package mysticworld.entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.BiomeDictionary; +import mysticworld.MysticWorld; +import mysticworld.lib.EntityIds; +import mysticworld.lib.Strings; import cpw.mods.fml.common.registry.EntityRegistry; -import MysticWorld.MysticWorld; -import MysticWorld.Lib.EntityIds; -import MysticWorld.Lib.Strings; public class EntityHandler { - - public static void init(){ + public static void init() { registerEntities(); } - - public static void registerEntities(){ + + public static void registerEntities() { EntityRegistry.registerModEntity(EntityChargeAir.class, Strings.ENTITY_AIR_CHARGE_NAME, EntityIds.ENTITY_AIR_CHARGE, MysticWorld.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityChargeFire.class, Strings.ENTITY_FIREBALL_NAME, EntityIds.ENTITY_FIREBALL, MysticWorld.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityChargeEarth.class, Strings.ENTITY_EARTH_CHARGE_NAME, EntityIds.ENTITY_EARTH_CHARGE, MysticWorld.instance, 80, 3, false); diff --git a/common/MysticWorld/Items/EnumArmor.java b/common/MysticWorld/Items/EnumArmor.java index 3a92ceb..89d822d 100644 --- a/common/MysticWorld/Items/EnumArmor.java +++ b/common/MysticWorld/Items/EnumArmor.java @@ -1,4 +1,4 @@ -package MysticWorld.Items; +package mysticworld.items; import net.minecraft.item.EnumArmorMaterial; import net.minecraftforge.common.EnumHelper; diff --git a/common/MysticWorld/Items/ItemArmorAdamantine.java b/common/MysticWorld/Items/ItemArmorAdamantine.java index e8584dd..7dd45b0 100644 --- a/common/MysticWorld/Items/ItemArmorAdamantine.java +++ b/common/MysticWorld/Items/ItemArmorAdamantine.java @@ -1,52 +1,47 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -public class ItemArmorAdamantine extends ItemArmor -{ +public class ItemArmorAdamantine extends ItemArmor { int ArmorType; - String ArmorFile_1; String ArmorFile_2; public ItemArmorAdamantine(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - super(par1, par2EnumArmorMaterial,par3,par4); - this.ArmorType=par4; - this.setMaxDamage(3000); - this.setCreativeTab(MysticWorld.MysticWorldTab); - this.ArmorFile_1 = "/MysticMods/textures/armor/adamantine_1.png"; - this.ArmorFile_2 = "/MysticMods/textures/armor/adamantine_2.png"; - } + super(par1, par2EnumArmorMaterial, par3, par4); + this.ArmorType = par4; + this.setMaxDamage(3000); + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/MysticMods/textures/armor/adamantine_1.png"; + this.ArmorFile_2 = "/MysticMods/textures/armor/adamantine_2.png"; + } - @Override - public void registerIcons(IconRegister iconRegister) - { - switch (ArmorType){ - case 0: - itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_0"); - break; - case 1: - itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_1"); - break; - case 2: - itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_2"); - break; - case 3: - itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_3"); - break; - } - } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) - { - int suffix = this.armorType == 2 ? 2 : 1; + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { + int suffix = this.armorType == 2 ? 2 : 1; + return "MysticMods:textures" + "/models/armor/Adamantine_layer_" + suffix + ".png"; + } - return "MysticMods:textures" + "/models/armor/Adamantine_layer_" + suffix + ".png"; - } + @Override + public void registerIcons(IconRegister iconRegister) { + switch (ArmorType) { + case 0: + itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_0"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_1"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_2"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticMods:AdamantineArmor_3"); + break; + } + } } diff --git a/common/MysticWorld/Items/ItemArmorIridium.java b/common/MysticWorld/Items/ItemArmorIridium.java index 2706157..754b513 100644 --- a/common/MysticWorld/Items/ItemArmorIridium.java +++ b/common/MysticWorld/Items/ItemArmorIridium.java @@ -1,8 +1,7 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; @@ -12,89 +11,72 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -public class ItemArmorIridium extends ItemArmor -{ +public class ItemArmorIridium extends ItemArmor { int ArmorType; - String ArmorFile_1; String ArmorFile_2; public ItemArmorIridium(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - - super(par1, par2EnumArmorMaterial,par3,par4); - this.ArmorType=par4; - this.setMaxDamage(4000); - this.setCreativeTab(MysticWorld.MysticWorldTab); - this.ArmorFile_1 = "/assets/MysticMods/textures/armor/iridium_1.png"; - this.ArmorFile_2 = "/assets/MysticMods/textures/armor/iridium_2.png"; - } + super(par1, par2EnumArmorMaterial, par3, par4); + this.ArmorType = par4; + this.setMaxDamage(4000); + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/assets/MysticMods/textures/armor/iridium_1.png"; + this.ArmorFile_2 = "/assets/MysticMods/textures/armor/iridium_2.png"; + } - @Override - public void registerIcons(IconRegister iconRegister) - { - switch (ArmorType){ - case 0: - itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_0"); - break; - case 1: - itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_1"); - break; - case 2: - itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_2"); - break; - case 3: - itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_3"); - break; + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { + int suffix = this.armorType == 2 ? 2 : 1; + return "MysticMods:textures" + "/models/armor/Iridium_layer_" + suffix + ".png"; + } + + @Override + public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { + ItemStack helmet = player.getCurrentItemOrArmor(4); + ItemStack plate = player.getCurrentItemOrArmor(3); + ItemStack legs = player.getCurrentItemOrArmor(2); + ItemStack boots = player.getCurrentItemOrArmor(1); + if (helmet != null) { + if (helmet.itemID == ItemHandler$1.iridiumHelmet.itemID) { + player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0))); } } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) - { - int suffix = this.armorType == 2 ? 2 : 1; - - return "MysticMods:textures" + "/models/armor/Iridium_layer_" + suffix + ".png"; - } - - @Override - public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) - { - ItemStack helmet = player.getCurrentItemOrArmor(4); - ItemStack plate = player.getCurrentItemOrArmor(3); - ItemStack legs = player.getCurrentItemOrArmor(2); - ItemStack boots = player.getCurrentItemOrArmor(1); - if (helmet != null) - { - if(helmet.itemID == ItemHandler$1.iridiumHelmet.itemID) - { - player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0))); - } - } - - if (plate != null) - { - if(plate.itemID == ItemHandler$1.iridiumChestplate.itemID) - { - player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0))); - } - } - - if (legs != null) - { - if(legs.itemID == ItemHandler$1.iridiumLeggings.itemID) - { - player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2))); - player.addVelocity(0.0005, 0, 0.0005); - player.stepHeight = 1.001F; - } - } - - if (boots != null) - { - if(boots.itemID == ItemHandler$1.iridiumBoots.itemID) - { - player.fallDistance = 0.0F; - player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 200, 2))); - } + if (plate != null) { + if (plate.itemID == ItemHandler$1.iridiumChestplate.itemID) { + player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0))); } } + if (legs != null) { + if (legs.itemID == ItemHandler$1.iridiumLeggings.itemID) { + player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2))); + player.addVelocity(0.0005, 0, 0.0005); + player.stepHeight = 1.001F; + } + } + if (boots != null) { + if (boots.itemID == ItemHandler$1.iridiumBoots.itemID) { + player.fallDistance = 0.0F; + player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 200, 2))); + } + } + } + + @Override + public void registerIcons(IconRegister iconRegister) { + switch (ArmorType) { + case 0: + itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_0"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_1"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_2"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticMods:IridiumArmor_3"); + break; + } + } } \ No newline at end of file diff --git a/common/MysticWorld/Items/ItemArmorMithril.java b/common/MysticWorld/Items/ItemArmorMithril.java index 25fe8cf..4706c40 100644 --- a/common/MysticWorld/Items/ItemArmorMithril.java +++ b/common/MysticWorld/Items/ItemArmorMithril.java @@ -1,53 +1,47 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -public class ItemArmorMithril extends ItemArmor -{ +public class ItemArmorMithril extends ItemArmor { int ArmorType; - String ArmorFile_1; String ArmorFile_2; public ItemArmorMithril(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - - super(par1, par2EnumArmorMaterial,par3,par4); - this.ArmorType=par4; - this.setMaxDamage(500); - this.setCreativeTab(MysticWorld.MysticWorldTab); - this.ArmorFile_1 = "/assets/MysticMods/textures/armor/mithril_1.png"; - this.ArmorFile_2 = "/assets/MysticMods/textures/armor/mithril_2.png"; - } + super(par1, par2EnumArmorMaterial, par3, par4); + this.ArmorType = par4; + this.setMaxDamage(500); + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/assets/MysticMods/textures/armor/mithril_1.png"; + this.ArmorFile_2 = "/assets/MysticMods/textures/armor/mithril_2.png"; + } - @Override - public void registerIcons(IconRegister iconRegister) - { - switch (ArmorType){ - case 0: - itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_0"); - break; - case 1: - itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_1"); - break; - case 2: - itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_2"); - break; - case 3: - itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_3"); - break; - } - } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) - { - int suffix = this.armorType == 2 ? 2 : 1; + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { + int suffix = this.armorType == 2 ? 2 : 1; + return "MysticMods:textures" + "/models/armor/Mithril_layer_" + suffix + ".png"; + } - return "MysticMods:textures" + "/models/armor/Mithril_layer_" + suffix + ".png"; - } + @Override + public void registerIcons(IconRegister iconRegister) { + switch (ArmorType) { + case 0: + itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_0"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_1"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_2"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticMods:MithrilArmor_3"); + break; + } + } } diff --git a/common/MysticWorld/Items/ItemArmorVerdite.java b/common/MysticWorld/Items/ItemArmorVerdite.java index 6aa0527..aed9f4f 100644 --- a/common/MysticWorld/Items/ItemArmorVerdite.java +++ b/common/MysticWorld/Items/ItemArmorVerdite.java @@ -1,53 +1,47 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -public class ItemArmorVerdite extends ItemArmor -{ +public class ItemArmorVerdite extends ItemArmor { int ArmorType; - String ArmorFile_1; String ArmorFile_2; public ItemArmorVerdite(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - - super(par1, par2EnumArmorMaterial,par3,par4); - this.ArmorType=par4; - this.setMaxDamage(262); - this.setCreativeTab(MysticWorld.MysticWorldTab); - this.ArmorFile_1 = "/assets/MysticMods/textures/armor/verdite_1.png"; - this.ArmorFile_2 = "/assets/MysticMods/textures/armor/verdite_2.png"; - } + super(par1, par2EnumArmorMaterial, par3, par4); + this.ArmorType = par4; + this.setMaxDamage(262); + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/assets/MysticMods/textures/armor/verdite_1.png"; + this.ArmorFile_2 = "/assets/MysticMods/textures/armor/verdite_2.png"; + } - @Override - public void registerIcons(IconRegister iconRegister) - { - switch (ArmorType){ - case 0: - itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_0"); - break; - case 1: - itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_1"); - break; - case 2: - itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_2"); - break; - case 3: - itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_3"); - break; - } - } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) - { - int suffix = this.armorType == 2 ? 2 : 1; + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { + int suffix = this.armorType == 2 ? 2 : 1; + return "MysticMods:textures" + "/models/armor/Verdite_layer_" + suffix + ".png"; + } - return "MysticMods:textures" + "/models/armor/Verdite_layer_" + suffix + ".png"; - } + @Override + public void registerIcons(IconRegister iconRegister) { + switch (ArmorType) { + case 0: + itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_0"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_1"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_2"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticMods:VerditeArmor_3"); + break; + } + } } diff --git a/common/MysticWorld/Items/ItemBushFruit.java b/common/MysticWorld/Items/ItemBushFruit.java index 5bb8ef0..f1f5808 100644 --- a/common/MysticWorld/Items/ItemBushFruit.java +++ b/common/MysticWorld/Items/ItemBushFruit.java @@ -1,16 +1,11 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.List; -import MysticWorld.MysticWorld; -import MysticWorld.Lib.Strings; -import MysticWorld.Util.Reference; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -18,154 +13,144 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemBushFruit extends ItemFood { - private Icon[] icons; - - private static final String[] FRUIT_TYPES = new String[] {"Mundane", "Poison", "Weakness", "Slowness", "Harming", "Wither", "Health", "Speed", "FireResistance", "Regen", "NightVision", "Invisibility"}; + private static final String[] FRUIT_TYPES = new String[] { "Mundane", "Poison", "Weakness", "Slowness", "Harming", "Wither", "Health", "Speed", "FireResistance", "Regen", "NightVision", + "Invisibility" }; - - public ItemBushFruit(int id, int health) - { + public ItemBushFruit(int id, int health) { super(id, health, 0.6F, false); - this.setHasSubtypes(true); - this.setCreativeTab(MysticWorld.MysticWorldTab); - maxStackSize = 64; - setAlwaysEdible(); - setUnlocalizedName("bushFruit"); + this.setHasSubtypes(true); + this.setCreativeTab(MysticWorld.MysticWorldTab); + maxStackSize = 64; + setAlwaysEdible(); + setUnlocalizedName("bushFruit"); } - - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player) - { - if ((player.canEat(true)) && (player.getFoodStats().getSaturationLevel() < 20.0F)) - { - player.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack)); - } - return par1ItemStack; - } - - protected void onFoodEaten(ItemStack itemstack, World world, EntityPlayer player) - { - if (!world.isRemote) - { - int duration = 0; - PotionEffect potion; - switch(itemstack.getItemDamage()) - { - case 1:potion = player.getActivePotionEffect(Potion.poison); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.poison.id, duration + 160, 0)); - break; - case 2:potion = player.getActivePotionEffect(Potion.weakness); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.weakness.id, duration + 160, 0)); - break; - case 3:potion = player.getActivePotionEffect(Potion.moveSlowdown); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration + 160, 0)); - break; - case 4:potion = player.getActivePotionEffect(Potion.harm); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.harm.id, duration + 1, 0)); - break; - case 5:potion = player.getActivePotionEffect(Potion.wither); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.wither.id, duration + 160, 0)); - break; - case 6:potion = player.getActivePotionEffect(Potion.heal); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.heal.id, duration + 1, 0)); - break; - case 7:potion = player.getActivePotionEffect(Potion.moveSpeed); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, duration + 160, 0)); - break; - case 8:potion = player.getActivePotionEffect(Potion.fireResistance); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, duration + 160, 0)); - break; - case 9:potion = player.getActivePotionEffect(Potion.regeneration); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, duration + 160, 0)); - break; - case 10:potion = player.getActivePotionEffect(Potion.nightVision); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, duration + 160, 0)); - break; - case 11:potion = player.getActivePotionEffect(Potion.invisibility); - if(potion != null) - { - duration = potion.duration; - } - player.addPotionEffect(new PotionEffect(Potion.invisibility.id, duration + 160, 0)); - break; - } - } - } + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, FRUIT_TYPES.length); + return icons[j]; + } - public int getMaxItemUseDuration(ItemStack itemstack) - { - return 24; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - icons = new Icon[FRUIT_TYPES.length]; - - for (int i = 0; i < FRUIT_TYPES.length; ++i) { - icons[i] = iconRegister.registerIcon("MysticMods:Fruit" + FRUIT_TYPES[i]); - } - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { + @Override + public int getMaxItemUseDuration(ItemStack itemstack) { + return 24; + } - int j = MathHelper.clamp_int(meta, 0, FRUIT_TYPES.length); - return icons[j]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - for (int var4 = 0; var4 < FRUIT_TYPES.length; var4++) - { - par3List.add(new ItemStack(par1, 1, var4)); - } - } + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int var4 = 0; var4 < FRUIT_TYPES.length; var4++) { + par3List.add(new ItemStack(par1, 1, var4)); + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player) { + if ((player.canEat(true)) && (player.getFoodStats().getSaturationLevel() < 20.0F)) { + player.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack)); + } + return par1ItemStack; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[FRUIT_TYPES.length]; + for (int i = 0; i < FRUIT_TYPES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticMods:Fruit" + FRUIT_TYPES[i]); + } + } + + @Override + protected void onFoodEaten(ItemStack itemstack, World world, EntityPlayer player) { + if (!world.isRemote) { + int duration = 0; + PotionEffect potion; + switch (itemstack.getItemDamage()) { + case 1: + potion = player.getActivePotionEffect(Potion.poison); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.poison.id, duration + 160, 0)); + break; + case 2: + potion = player.getActivePotionEffect(Potion.weakness); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.weakness.id, duration + 160, 0)); + break; + case 3: + potion = player.getActivePotionEffect(Potion.moveSlowdown); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration + 160, 0)); + break; + case 4: + potion = player.getActivePotionEffect(Potion.harm); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.harm.id, duration + 1, 0)); + break; + case 5: + potion = player.getActivePotionEffect(Potion.wither); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.wither.id, duration + 160, 0)); + break; + case 6: + potion = player.getActivePotionEffect(Potion.heal); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.heal.id, duration + 1, 0)); + break; + case 7: + potion = player.getActivePotionEffect(Potion.moveSpeed); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, duration + 160, 0)); + break; + case 8: + potion = player.getActivePotionEffect(Potion.fireResistance); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, duration + 160, 0)); + break; + case 9: + potion = player.getActivePotionEffect(Potion.regeneration); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, duration + 160, 0)); + break; + case 10: + potion = player.getActivePotionEffect(Potion.nightVision); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, duration + 160, 0)); + break; + case 11: + potion = player.getActivePotionEffect(Potion.invisibility); + if (potion != null) { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.invisibility.id, duration + 160, 0)); + break; + } + } + } } - diff --git a/common/MysticWorld/Items/ItemHandler$1.java b/common/MysticWorld/Items/ItemHandler$1.java index 4fb7434..3e66656 100644 --- a/common/MysticWorld/Items/ItemHandler$1.java +++ b/common/MysticWorld/Items/ItemHandler$1.java @@ -1,108 +1,86 @@ -package MysticWorld.Items; +package mysticworld.items; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import MysticWorld.MysticWorld; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Lib.ItemIds; -import MysticWorld.Lib.Strings; -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumArmorMaterial; +import mysticworld.MysticWorld; +import mysticworld.lib.ItemIds; +import mysticworld.lib.Strings; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.EnumHelper; public class ItemHandler$1 { - public static Item staffParts; - public static Item imbuedShard; - public static Item fireStaff; public static Item waterStaff; public static Item earthStaff; public static Item airStaff; public static Item energyStaff; - public static Item fireStaffPower; public static Item waterStaffPower; public static Item earthStaffPower; public static Item airStaffPower; public static Item energyStaffPower; - public static Item staffPower; - public static Item fireOrb; public static Item waterOrb; public static Item earthOrb; public static Item airOrb; public static Item energyOrb; - public static Item bushFruit; - public static Item verditeHelmet; public static Item verditeChestplate; public static Item verditeLeggings; public static Item verditeBoots; - public static Item adamantineHelmet; public static Item adamantineChestplate; public static Item adamantineLeggings; public static Item adamantineBoots; - public static Item mithrilHelmet; public static Item mithrilChestplate; public static Item mithrilLeggings; public static Item mithrilBoots; - public static Item iridiumHelmet; public static Item iridiumChestplate; public static Item iridiumLeggings; public static Item iridiumBoots; - public static Item voidShard; - - public static void init(){ + public static void init() { staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS); imbuedShard = new ItemImbuedShard(ItemIds.IMBUED_SHARD); bushFruit = new ItemBushFruit(ItemIds.BUSH_FRUIT, 2); - fireStaff = new ItemStaffFire(ItemIds.FIRE_STAFF).setUnlocalizedName(Strings.FIRE_STAFF_NAME); waterStaff = new ItemStaffWater(ItemIds.WATER_STAFF).setUnlocalizedName(Strings.WATER_STAFF_NAME); earthStaff = new ItemStaffEarth(ItemIds.EARTH_STAFF).setUnlocalizedName(Strings.EARTH_STAFF_NAME); airStaff = new ItemStaffAir(ItemIds.AIR_STAFF).setUnlocalizedName(Strings.AIR_STAFF_NAME); energyStaff = new ItemStaffEnegy(ItemIds.ENERGY_STAFF).setUnlocalizedName(Strings.ENERGY_STAFF_NAME); - staffPower = new ItemStaffPower(ItemIds.STAFF_POWER); - fireOrb = new ItemOrbFire(ItemIds.FIRE_ORB).setUnlocalizedName(Strings.FIRE_ORB_NAME); waterOrb = new ItemOrbWater(ItemIds.WATER_ORB).setUnlocalizedName(Strings.WATER_ORB_NAME); earthOrb = new ItemOrbEarth(ItemIds.EARTH_ORB).setUnlocalizedName(Strings.EARTH_ORB_NAME); airOrb = new ItemOrbAir(ItemIds.AIR_ORB).setUnlocalizedName(Strings.AIR_ORB_NAME); energyOrb = new ItemOrbEnergy(ItemIds.ENERGY_ORB).setUnlocalizedName(Strings.ENERGY_ORB_NAME); - verditeHelmet = new ItemArmorVerdite(ItemIds.VERDITE_HELMET, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 0).setUnlocalizedName(Strings.VERDITE_HELMET_NAME); - verditeChestplate = new ItemArmorVerdite(ItemIds.VERDITE_CHESTPLATE, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 1).setUnlocalizedName(Strings.VERDITE_CHESTPLATE_NAME); + verditeChestplate = new ItemArmorVerdite(ItemIds.VERDITE_CHESTPLATE, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 1) + .setUnlocalizedName(Strings.VERDITE_CHESTPLATE_NAME); verditeLeggings = new ItemArmorVerdite(ItemIds.VERDITE_LEGGINGS, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 2).setUnlocalizedName(Strings.VERDITE_LEGGINGS_NAME); verditeBoots = new ItemArmorVerdite(ItemIds.VERDITE_BOOTS, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 3).setUnlocalizedName(Strings.VERDITE_BOOTS_NAME); - mithrilHelmet = new ItemArmorMithril(ItemIds.MITHRIL_HELMET, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 0).setUnlocalizedName(Strings.MITHRIL_HELMET_NAME); - mithrilChestplate = new ItemArmorMithril(ItemIds.MITHRIL_CHESTPLATE, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 1).setUnlocalizedName(Strings.MITHRIL_CHESTPLATE_NAME); + mithrilChestplate = new ItemArmorMithril(ItemIds.MITHRIL_CHESTPLATE, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 1) + .setUnlocalizedName(Strings.MITHRIL_CHESTPLATE_NAME); mithrilLeggings = new ItemArmorMithril(ItemIds.MITHRIL_LEGGINGS, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 2).setUnlocalizedName(Strings.MITHRIL_LEGGINGS_NAME); mithrilBoots = new ItemArmorMithril(ItemIds.MITHRIL_BOOTS, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 3).setUnlocalizedName(Strings.MITHRIL_BOOTS_NAME); - - adamantineHelmet = new ItemArmorAdamantine(ItemIds.ADAMANTINE_HELMET, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 0).setUnlocalizedName(Strings.ADAMANTINE_HELMET_NAME); - adamantineChestplate = new ItemArmorAdamantine(ItemIds.ADAMANTINE_CHESTPLATE, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 1).setUnlocalizedName(Strings.ADAMANTINE_CHESTPLATE_NAME); - adamantineLeggings = new ItemArmorAdamantine(ItemIds.ADAMANTINE_LEGGINGS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 2).setUnlocalizedName(Strings.ADAMANTINE_LEGGINGS_NAME); - adamantineBoots = new ItemArmorAdamantine(ItemIds.ADAMANTINE_BOOTS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 3).setUnlocalizedName(Strings.ADAMANTINE_BOOTS_NAME); - + adamantineHelmet = new ItemArmorAdamantine(ItemIds.ADAMANTINE_HELMET, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 0) + .setUnlocalizedName(Strings.ADAMANTINE_HELMET_NAME); + adamantineChestplate = new ItemArmorAdamantine(ItemIds.ADAMANTINE_CHESTPLATE, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 1) + .setUnlocalizedName(Strings.ADAMANTINE_CHESTPLATE_NAME); + adamantineLeggings = new ItemArmorAdamantine(ItemIds.ADAMANTINE_LEGGINGS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 2) + .setUnlocalizedName(Strings.ADAMANTINE_LEGGINGS_NAME); + adamantineBoots = new ItemArmorAdamantine(ItemIds.ADAMANTINE_BOOTS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 3) + .setUnlocalizedName(Strings.ADAMANTINE_BOOTS_NAME); iridiumHelmet = new ItemArmorIridium(ItemIds.IRIDIUM_HELMET, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 0).setUnlocalizedName(Strings.IRIDIUM_HELMET_NAME); - iridiumChestplate = new ItemArmorIridium(ItemIds.IRIDIUM_CHESTPLATE, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 1).setUnlocalizedName(Strings.IRIDIUM_CHESTPLATE_NAME); + iridiumChestplate = new ItemArmorIridium(ItemIds.IRIDIUM_CHESTPLATE, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 1) + .setUnlocalizedName(Strings.IRIDIUM_CHESTPLATE_NAME); iridiumLeggings = new ItemArmorIridium(ItemIds.IRIDIUM_LEGGINGS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 2).setUnlocalizedName(Strings.IRIDIUM_LEGGINGS_NAME); iridiumBoots = new ItemArmorIridium(ItemIds.IRIDIUM_BOOTS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 3).setUnlocalizedName(Strings.IRIDIUM_BOOTS_NAME); - voidShard = new ItemVoidShard(ItemIds.VOID_SHARD).setUnlocalizedName(Strings.VOID_SHARD_NAME); } } diff --git a/common/MysticWorld/Items/ItemImbuedShard.java b/common/MysticWorld/Items/ItemImbuedShard.java index 53a37eb..2c14c2b 100644 --- a/common/MysticWorld/Items/ItemImbuedShard.java +++ b/common/MysticWorld/Items/ItemImbuedShard.java @@ -1,63 +1,56 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.List; +import mysticworld.MysticWorld; +import mysticworld.lib.Strings; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import MysticWorld.MysticWorld; -import MysticWorld.Lib.Strings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemImbuedShard extends Item { - private Icon[] icons; - - private static final String[] SHARD_TYPES = new String[] {"Fire", "Water", "Earth", "Air", "Energy"}; - + private static final String[] SHARD_TYPES = new String[] { "Fire", "Water", "Earth", "Air", "Energy" }; + public ItemImbuedShard(int id) { super(id); - this.setHasSubtypes(true); - this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME); - this.setCreativeTab(MysticWorld.MysticWorldTab); + this.setHasSubtypes(true); + this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, 5); + return icons[j]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int var4 = 0; var4 < SHARD_TYPES.length; var4++) { + par3List.add(new ItemStack(par1, 1, var4)); + } + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + SHARD_TYPES[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[SHARD_TYPES.length]; + for (int i = 0; i < SHARD_TYPES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticMods:Shard" + SHARD_TYPES[i]); + } } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); - return super.getUnlocalizedName() + SHARD_TYPES[meta]; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { - icons = new Icon[SHARD_TYPES.length]; - - for (int i = 0; i < SHARD_TYPES.length; ++i) { - icons[i] = iconRegister.registerIcon("MysticMods:Shard" + SHARD_TYPES[i]); - } - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { - int j = MathHelper.clamp_int(meta, 0, 5); - return icons[j]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { - for (int var4 = 0; var4 < SHARD_TYPES.length; var4++){ - par3List.add(new ItemStack(par1, 1, var4)); - } - } - } diff --git a/common/MysticWorld/Items/ItemOrb.java b/common/MysticWorld/Items/ItemOrb.java index 3de9b04..fc80577 100644 --- a/common/MysticWorld/Items/ItemOrb.java +++ b/common/MysticWorld/Items/ItemOrb.java @@ -1,20 +1,17 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.Random; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import net.minecraft.item.Item; public class ItemOrb extends Item { - Random rand = new Random(); - - public ItemOrb(int id) - { + + public ItemOrb(int id) { super(id); - this.setMaxStackSize(1); - this.setMaxDamage(200); + this.setMaxStackSize(1); + this.setMaxDamage(200); this.setCreativeTab(MysticWorld.MysticWorldTab); } - } diff --git a/common/MysticWorld/Items/ItemOrbAir.java b/common/MysticWorld/Items/ItemOrbAir.java index e9eaf66..e5249eb 100644 --- a/common/MysticWorld/Items/ItemOrbAir.java +++ b/common/MysticWorld/Items/ItemOrbAir.java @@ -1,142 +1,99 @@ -package MysticWorld.Items; +package mysticworld.items; -import java.util.Random; - -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; - -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeAir; -import net.minecraft.client.renderer.texture.IconRegister; +import mysticworld.MysticWorld; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -public class ItemOrbAir extends ItemOrb -{ - public ItemOrbAir(int id) - { +import org.lwjgl.input.Mouse; + +public class ItemOrbAir extends ItemOrb { + public ItemOrbAir(int id) { super(id); } @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); + itemStack.setTagCompound(new NBTTagCompound()); + if (itemStack.stackTagCompound.getBoolean("charging") == false) { + itemStack.stackTagCompound.setBoolean("charging", true); + } + return itemStack; + } - EntityPlayer player = (EntityPlayer)entity; - ItemStack currentItem = player.inventory.getCurrentItem(); - + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + if (itemStack.stackTagCompound == null) + itemStack.setTagCompound(new NBTTagCompound()); + EntityPlayer player = (EntityPlayer) entity; + ItemStack currentItem = player.inventory.getCurrentItem(); itemStack.stackTagCompound.setInteger("maxChargeTime", 5 * 20); - - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.fallDistance = 0.0F; - chargeEffect(itemStack, world, player); - - if (!Mouse.isButtonDown(1)) - { - if (itemStack.stackTagCompound.getInteger("chargeTime") > 0) - { - if (player.onGround) - { - world.playSoundEffect(player.posX, player.posY, player.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - player.setVelocity(0.0D, 1.0D + (float)(itemStack.stackTagCompound.getInteger("chargeTime")) * (2.5D * (1.0D / (double)itemStack.stackTagCompound.getInteger("maxChargeTime"))), 0.0D); - - itemStack.damageItem(1, player); + if (!Mouse.isButtonDown(1)) { + if (itemStack.stackTagCompound.getInteger("chargeTime") > 0) { + if (player.onGround) { + world.playSoundEffect(player.posX, player.posY, player.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + player.setVelocity(0.0D, 1.0D + (itemStack.stackTagCompound.getInteger("chargeTime")) * (2.5D * (1.0D / itemStack.stackTagCompound.getInteger("maxChargeTime"))), 0.0D); + itemStack.damageItem(1, player); } } - resetData(itemStack); - } - else - { - if (itemStack.stackTagCompound.getBoolean("charging") == true) - { + } else { + if (itemStack.stackTagCompound.getBoolean("charging") == true) { incrementData(itemStack); } - spiralEffect(itemStack, world, player); } - } - } - else - { + } + } else { resetData(itemStack); itemStack.stackTagCompound.setFloat("angle", 0); itemStack.stackTagCompound.setDouble("radius", 0); } - - if (itemStack.stackTagCompound.getInteger("chargeTime") > itemStack.stackTagCompound.getInteger("maxChargeTime")) - { + if (itemStack.stackTagCompound.getInteger("chargeTime") > itemStack.stackTagCompound.getInteger("maxChargeTime")) { itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("maxChargeTime")); } - - if (itemStack.stackTagCompound.getDouble("radius") > 2.5D) - { + if (itemStack.stackTagCompound.getDouble("radius") > 2.5D) { itemStack.stackTagCompound.setDouble("radius", 2.5D); } - - if (itemStack.stackTagCompound.getFloat("angle") > 6.0f) - { + if (itemStack.stackTagCompound.getFloat("angle") > 6.0f) { itemStack.stackTagCompound.setFloat("angle", 0.0f); } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); - - if (itemStack.stackTagCompound.getBoolean("charging") == false) - { - itemStack.stackTagCompound.setBoolean("charging", true); - } - - return itemStack; - } - - private void spiralEffect(ItemStack itemStack, World world, EntityPlayer player) - { - double particleX = player.posX + (double)(MathHelper.cos(itemStack.stackTagCompound.getFloat("angle"))) * itemStack.stackTagCompound.getDouble("radius"); - double particleY = player.posY; - double particleZ = player.posZ + (double)(MathHelper.sin(itemStack.stackTagCompound.getFloat("angle"))) * itemStack.stackTagCompound.getDouble("radius"); - float particleScale = ((float)(itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float)itemStack.stackTagCompound.getInteger("maxChargeTime")))); - if (!world.isRemote) - MysticWorld.proxy.airFeetFX(world, particleX, particleY, particleZ, 1.0f + particleScale, 15); - } - - private void chargeEffect(ItemStack itemStack, World world, EntityPlayer player) - { + private void chargeEffect(ItemStack itemStack, World world, EntityPlayer player) { double particleX = (player.posX - 0.5D) + rand.nextDouble(); - double particleZ = (player.posZ - 0.5D) + rand.nextDouble(); - + double particleZ = (player.posZ - 0.5D) + rand.nextDouble(); if (!world.isRemote) MysticWorld.proxy.airFeetFX(world, particleX, player.posY, particleZ, 1.0f, 15); } - - private void resetData(ItemStack itemStack) - { + + private void incrementData(ItemStack itemStack) { + itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("chargeTime") + 1); + itemStack.stackTagCompound.setFloat("angle", itemStack.stackTagCompound.getFloat("angle") + 0.2f); + itemStack.stackTagCompound.setDouble("radius", itemStack.stackTagCompound.getInteger("chargeTime") * 0.025D); + } + + private void resetData(ItemStack itemStack) { itemStack.stackTagCompound.setInteger("chargeTime", 0); itemStack.stackTagCompound.setBoolean("charging", false); itemStack.stackTagCompound.setFloat("angle", 0); itemStack.stackTagCompound.setDouble("radius", 0); } - - private void incrementData(ItemStack itemStack) - { - itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("chargeTime") + 1); - itemStack.stackTagCompound.setFloat("angle", itemStack.stackTagCompound.getFloat("angle") + 0.2f); - itemStack.stackTagCompound.setDouble("radius", (double)itemStack.stackTagCompound.getInteger("chargeTime") * 0.025D); + + private void spiralEffect(ItemStack itemStack, World world, EntityPlayer player) { + double particleX = player.posX + (MathHelper.cos(itemStack.stackTagCompound.getFloat("angle"))) * itemStack.stackTagCompound.getDouble("radius"); + double particleY = player.posY; + double particleZ = player.posZ + (MathHelper.sin(itemStack.stackTagCompound.getFloat("angle"))) * itemStack.stackTagCompound.getDouble("radius"); + float particleScale = ((itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float) itemStack.stackTagCompound.getInteger("maxChargeTime")))); + if (!world.isRemote) + MysticWorld.proxy.airFeetFX(world, particleX, particleY, particleZ, 1.0f + particleScale, 15); } } diff --git a/common/MysticWorld/Items/ItemOrbEarth.java b/common/MysticWorld/Items/ItemOrbEarth.java index 1ea8f25..77b6da5 100644 --- a/common/MysticWorld/Items/ItemOrbEarth.java +++ b/common/MysticWorld/Items/ItemOrbEarth.java @@ -1,257 +1,164 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeAir; +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.BlockCocoa; import net.minecraft.block.BlockCrops; import net.minecraft.block.BlockDirectional; -import net.minecraft.block.BlockLog; import net.minecraft.block.BlockMushroom; import net.minecraft.block.BlockSapling; import net.minecraft.block.BlockStem; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.entity.player.BonemealEvent; -public class ItemOrbEarth extends ItemOrb -{ - public ItemOrbEarth(int id) - { +public class ItemOrbEarth extends ItemOrb { + public ItemOrbEarth(int id) { super(id); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { + if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { + return false; + } else { + if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) { + if (!par3World.isRemote) { + par3World.playAuxSFX(2005, par4, par5, par6, 0); + } + return true; + } + return false; + } + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { MysticWorld.proxy.earthFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) - { - return false; - } - else - { - if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) - { - if (!par3World.isRemote) - { - par3World.playAuxSFX(2005, par4, par5, par6, 0); - } - return true; - } - return false; - } + + public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) { + int l = par1World.getBlockId(par2, par3, par4); + BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4); + if (MinecraftForge.EVENT_BUS.post(event)) { + return false; + } + if (event.getResult() == Result.ALLOW) { + itemStack.damageItem(1, player); + return true; + } + if (l == Block.sapling.blockID) { + if (!par1World.isRemote) { + if (par1World.rand.nextFloat() < 0.45D) { + ((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); + } + itemStack.damageItem(1, player); + } + return true; + } else if (l == Block.cobblestone.blockID) { + if (!par1World.isRemote) { + par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID); + } + itemStack.damageItem(1, player); + } else if (l == Block.deadBush.blockID) { + if (!par1World.isRemote) { + par1World.setBlock(par2, par3, par4, 0); + par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1))); + } + itemStack.damageItem(1, player); + } else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) { + if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) { + if (l > 0 && Block.blocksList[l] instanceof BlockCrops) { + if (par1World.getBlockMetadata(par2, par3, par4) == 7) { + return false; + } else { + if (!par1World.isRemote) { + ((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4); + itemStack.damageItem(1, player); + } + return true; + } + } else { + int i1; + int j1; + int k1; + if (l == Block.cocoaPlant.blockID) { + i1 = par1World.getBlockMetadata(par2, par3, par4); + j1 = BlockDirectional.getDirection(i1); + k1 = BlockCocoa.func_72219_c(i1); + if (k1 >= 2) { + return false; + } else { + if (!par1World.isRemote) { + ++k1; + par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2); + itemStack.damageItem(1, player); + } + return true; + } + } else if (l != Block.grass.blockID) { + return false; + } else { + if (!par1World.isRemote) { + itemStack.damageItem(1, player); + label102: for (i1 = 0; i1 < 128; ++i1) { + j1 = par2; + k1 = par3 + 1; + int l1 = par4; + for (int i2 = 0; i2 < i1 / 16; ++i2) { + j1 += itemRand.nextInt(3) - 1; + k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2; + l1 += itemRand.nextInt(3) - 1; + if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) { + continue label102; + } + } + if (par1World.getBlockId(j1, k1, l1) == 0) { + if (itemRand.nextInt(10) != 0) { + if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) { + par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); + } + } else { + ForgeHooks.plantGrass(par1World, j1, k1, l1); + } + } + } + } + return true; + } + } + } else if (par1World.getBlockMetadata(par2, par3, par4) == 7) { + return false; + } else { + if (!par1World.isRemote) { + ((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); + itemStack.damageItem(1, player); + } + return true; + } + } else { + if (!par1World.isRemote) { + if (par1World.rand.nextFloat() < 0.4D) { + ((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); + } + itemStack.damageItem(1, player); + } + return true; + } + return true; } - - public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) - { - int l = par1World.getBlockId(par2, par3, par4); - - BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - if (event.getResult() == Result.ALLOW) - { - itemStack.damageItem(1, player); - - return true; - } - - if (l == Block.sapling.blockID) - { - if (!par1World.isRemote) - { - if ((double)par1World.rand.nextFloat() < 0.45D) - { - ((BlockSapling)Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); - } - - itemStack.damageItem(1, player); - } - return true; - } - else if (l == Block.cobblestone.blockID) - { - if (!par1World.isRemote) - { - par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID); - } - - itemStack.damageItem(1, player); - } - else if (l == Block.deadBush.blockID) - { - if (!par1World.isRemote) - { - par1World.setBlock(par2, par3, par4, 0); - par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1))); - } - - itemStack.damageItem(1, player); - } - else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) - { - if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) - { - if (l > 0 && Block.blocksList[l] instanceof BlockCrops) - { - if (par1World.getBlockMetadata(par2, par3, par4) == 7) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ((BlockCrops)Block.blocksList[l]).fertilize(par1World, par2, par3, par4); - itemStack.damageItem(1, player); - } - - return true; - } - } - else - { - int i1; - int j1; - int k1; - - if (l == Block.cocoaPlant.blockID) - { - i1 = par1World.getBlockMetadata(par2, par3, par4); - j1 = BlockDirectional.getDirection(i1); - k1 = BlockCocoa.func_72219_c(i1); - - if (k1 >= 2) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ++k1; - par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2); - itemStack.damageItem(1, player); - } - - return true; - } - } - else if (l != Block.grass.blockID) - { - return false; - } - else - { - if (!par1World.isRemote) - { - itemStack.damageItem(1, player); - label102: - - for (i1 = 0; i1 < 128; ++i1) - { - j1 = par2; - k1 = par3 + 1; - int l1 = par4; - - for (int i2 = 0; i2 < i1 / 16; ++i2) - { - j1 += itemRand.nextInt(3) - 1; - k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2; - l1 += itemRand.nextInt(3) - 1; - - if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) - { - continue label102; - } - } - - if (par1World.getBlockId(j1, k1, l1) == 0) - { - if (itemRand.nextInt(10) != 0) - { - if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) - { - par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); - } - } - else - { - ForgeHooks.plantGrass(par1World, j1, k1, l1); - } - } - } - } - - return true; - } - } - } - else if (par1World.getBlockMetadata(par2, par3, par4) == 7) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ((BlockStem)Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); - itemStack.damageItem(1, player); - } - - return true; - } - } - else - { - if (!par1World.isRemote) - { - if ((double)par1World.rand.nextFloat() < 0.4D) - { - ((BlockMushroom)Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); - } - - itemStack.damageItem(1, player); - } - - return true; - } - - return true; - } - } diff --git a/common/MysticWorld/Items/ItemOrbEnergy.java b/common/MysticWorld/Items/ItemOrbEnergy.java index 7fb5a8e..83f3b6f 100644 --- a/common/MysticWorld/Items/ItemOrbEnergy.java +++ b/common/MysticWorld/Items/ItemOrbEnergy.java @@ -1,94 +1,63 @@ -package MysticWorld.Items; +package mysticworld.items; -import MysticWorld.MysticWorld; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Entity.EntityChargeAir; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; +import mysticworld.MysticWorld; +import mysticworld.blocks.BlockHandler; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class ItemOrbEnergy extends ItemOrb { - - public ItemOrbEnergy(int id) - { + public ItemOrbEnergy(int id) { super(id); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { + if (par7 == 0) { + --par5; + } + if (par7 == 1) { + ++par5; + } + if (par7 == 2) { + --par6; + } + if (par7 == 3) { + ++par6; + } + if (par7 == 4) { + --par4; + } + if (par7 == 5) { + ++par4; + } + if (!entityPlayer.canPlayerEdit(par4, par5, par6, par7, itemStack)) { + return false; + } else { + int i1 = world.getBlockId(par4, par5, par6); + if (i1 == 0) { + world.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlock(par4, par5, par6, BlockHandler.lightCube.blockID); + } + itemStack.damageItem(1, entityPlayer); + return true; + } + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 20, 2)); MysticWorld.proxy.energyFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if (par7 == 0) - { - --par5; - } - - if (par7 == 1) - { - ++par5; - } - - if (par7 == 2) - { - --par6; - } - - if (par7 == 3) - { - ++par6; - } - - if (par7 == 4) - { - --par4; - } - - if (par7 == 5) - { - ++par4; - } - - if (!entityPlayer.canPlayerEdit(par4, par5, par6, par7, itemStack)) - { - return false; - } - else - { - int i1 = world.getBlockId(par4, par5, par6); - - if (i1 == 0) - { - world.playSoundEffect((double)par4 + 0.5D, (double)par5 + 0.5D, (double)par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlock(par4, par5, par6, BlockHandler.lightCube.blockID); - } - - itemStack.damageItem(1, entityPlayer); - return true; - } - } - } diff --git a/common/MysticWorld/Items/ItemOrbFire.java b/common/MysticWorld/Items/ItemOrbFire.java index ba0d6ee..405f85b 100644 --- a/common/MysticWorld/Items/ItemOrbFire.java +++ b/common/MysticWorld/Items/ItemOrbFire.java @@ -1,18 +1,10 @@ -package MysticWorld.Items; +package mysticworld.items; -import java.util.Random; - -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeAir; +import mysticworld.MysticWorld; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFlintAndSteel; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -20,99 +12,68 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class ItemOrbFire extends ItemOrb { - public ItemOrbFire(int id) { super(id); } + public boolean itemInteractionForEntity(ItemStack itemStack, EntityLiving entityLiving) { + entityLiving.setFire(5); + entityLiving.attackEntityFrom(DamageSource.magic, 7); + itemStack.damageItem(1, entityLiving); + return true; + } + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { + if (par7 == 0) { + --par5; + } + if (par7 == 1) { + ++par5; + } + if (par7 == 2) { + --par6; + } + if (par7 == 3) { + ++par6; + } + if (par7 == 4) { + --par4; + } + if (par7 == 5) { + ++par4; + } + if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { + return false; + } else { + if (par3World.isAirBlock(par4, par5, par6)) { + par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + par3World.setBlock(par4, par5, par6, Block.fire.blockID); + } + par1ItemStack.damageItem(1, par2EntityPlayer); + return true; + } + } + + @Override + public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer entityPlayer, Entity entity) { + entity.setFire(5); + entity.attackEntityFrom(DamageSource.magic, 7); + itemStack.damageItem(1, entityPlayer); + return true; + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 20, 0)); MysticWorld.proxy.fireFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if (par7 == 0) - { - --par5; - } - - if (par7 == 1) - { - ++par5; - } - - if (par7 == 2) - { - --par6; - } - - if (par7 == 3) - { - ++par6; - } - - if (par7 == 4) - { - --par4; - } - - if (par7 == 5) - { - ++par4; - } - - if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) - { - return false; - } - else - { - if (par3World.isAirBlock(par4, par5, par6)) - { - par3World.playSoundEffect((double)par4 + 0.5D, (double)par5 + 0.5D, (double)par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - par3World.setBlock(par4, par5, par6, Block.fire.blockID); - } - - par1ItemStack.damageItem(1, par2EntityPlayer); - return true; - } - } - - public boolean itemInteractionForEntity(ItemStack itemStack, EntityLiving entityLiving) - { - entityLiving.setFire(5); - entityLiving.attackEntityFrom(DamageSource.magic, 7); - - itemStack.damageItem(1, entityLiving); - - return true; - } - - @Override - public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer entityPlayer, Entity entity) - { - entity.setFire(5); - entity.attackEntityFrom(DamageSource.magic, 7); - - itemStack.damageItem(1, entityPlayer); - - return true; - } - } diff --git a/common/MysticWorld/Items/ItemOrbWater.java b/common/MysticWorld/Items/ItemOrbWater.java index a9c74bf..8ea45e7 100644 --- a/common/MysticWorld/Items/ItemOrbWater.java +++ b/common/MysticWorld/Items/ItemOrbWater.java @@ -1,141 +1,87 @@ -package MysticWorld.Items; +package mysticworld.items; -import java.util.Random; - -import MysticWorld.MysticWorld; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Entity.EntityChargeAir; +import mysticworld.MysticWorld; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.Event; -import net.minecraftforge.event.entity.player.FillBucketEvent; public class ItemOrbWater extends ItemOrb { - - public ItemOrbWater(int id) - { + public ItemOrbWater(int id) { super(id); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); + if (movingobjectposition == null) { + return itemStack; + } else { + if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + if (!world.canMineBlock(entityPlayer, i, j, k)) { + return itemStack; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } + if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) { + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlockToAir(i, j, k); + itemStack.damageItem(1, entityPlayer); + return itemStack; + } else { + if (movingobjectposition.sideHit == 0) { + --j; + } + if (movingobjectposition.sideHit == 1) { + ++j; + } + if (movingobjectposition.sideHit == 2) { + --k; + } + if (movingobjectposition.sideHit == 3) { + ++k; + } + if (movingobjectposition.sideHit == 4) { + --i; + } + if (movingobjectposition.sideHit == 5) { + ++i; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + int i1 = world.getBlockId(i, j, k); + if (i1 == 0) { + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlock(i, j, k, Block.waterMoving.blockID); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + } + } + return itemStack; + } + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (itemStack != null) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (itemStack != null) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { MysticWorld.proxy.waterFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); - - if (movingobjectposition == null) - { - return itemStack; - } - else - { - if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(entityPlayer, i, j, k)) - { - return itemStack; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - - if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) - { - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlockToAir(i, j, k); - - itemStack.damageItem(1, entityPlayer); - - return itemStack; - } - else - { - if (movingobjectposition.sideHit == 0) - { - --j; - } - - if (movingobjectposition.sideHit == 1) - { - ++j; - } - - if (movingobjectposition.sideHit == 2) - { - --k; - } - - if (movingobjectposition.sideHit == 3) - { - ++k; - } - - if (movingobjectposition.sideHit == 4) - { - --i; - } - - if (movingobjectposition.sideHit == 5) - { - ++i; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - else - { - int i1 = world.getBlockId(i, j, k); - - if (i1 == 0) - { - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlock(i, j, k, Block.waterMoving.blockID); - itemStack.damageItem(1, entityPlayer); - } - - return itemStack; - } - } - } - - return itemStack; - } - } } diff --git a/common/MysticWorld/Items/ItemStaff.java b/common/MysticWorld/Items/ItemStaff.java index 146c22f..c2ec23d 100644 --- a/common/MysticWorld/Items/ItemStaff.java +++ b/common/MysticWorld/Items/ItemStaff.java @@ -1,29 +1,25 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.Random; +import mysticworld.MysticWorld; +import net.minecraft.item.Item; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import MysticWorld.MysticWorld; -import net.minecraft.item.Item; -public class ItemStaff extends Item -{ +public class ItemStaff extends Item { Random rand = new Random(); - - public ItemStaff(int id) - { + + public ItemStaff(int id) { super(id); - this.setMaxStackSize(1); - this.setMaxDamage(200); + this.setMaxStackSize(1); + this.setMaxDamage(200); this.setCreativeTab(MysticWorld.MysticWorldTab); } - + @Override - @SideOnly(Side.CLIENT) - public boolean isFull3D() - { - return true; - } - + @SideOnly(Side.CLIENT) + public boolean isFull3D() { + return true; + } } diff --git a/common/MysticWorld/Items/ItemStaffAir.java b/common/MysticWorld/Items/ItemStaffAir.java index f545b41..10a856d 100644 --- a/common/MysticWorld/Items/ItemStaffAir.java +++ b/common/MysticWorld/Items/ItemStaffAir.java @@ -1,112 +1,80 @@ -package MysticWorld.Items; +package mysticworld.items; +import mysticworld.MysticWorld; +import mysticworld.entity.EntityChargeAir; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeAir; - public class ItemStaffAir extends ItemStaff { - - public ItemStaffAir(int id) - { + public ItemStaffAir(int id) { super(id); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); + itemStack.setTagCompound(new NBTTagCompound()); + if (itemStack.stackTagCompound.getBoolean("charging") == false) { + itemStack.stackTagCompound.setBoolean("charging", true); + } + return itemStack; + } - EntityPlayer player = (EntityPlayer)entity; - ItemStack currentItem = player.inventory.getCurrentItem(); - + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + if (itemStack.stackTagCompound == null) + itemStack.setTagCompound(new NBTTagCompound()); + EntityPlayer player = (EntityPlayer) entity; + ItemStack currentItem = player.inventory.getCurrentItem(); itemStack.stackTagCompound.setInteger("maxChargeTime", 3 * 20); - - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.fallDistance = 0.0F; - chargeEffect(itemStack, world, player); - - if (!Mouse.isButtonDown(1)) - { - if (itemStack.stackTagCompound.getInteger("chargeTime") > 0) - { - if (!world.isRemote) - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)player.posX, (int)player.posY, (int)player.posZ, 0); - world.spawnEntityInWorld(new EntityChargeAir(world, player, 1.0f + ((float)(itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float)itemStack.stackTagCompound.getInteger("maxChargeTime")))), (float)(itemStack.stackTagCompound.getInteger("chargeTime")) * (2.5D * (1.0D / (double)itemStack.stackTagCompound.getInteger("maxChargeTime"))))); - - itemStack.damageItem(1, player); + if (!Mouse.isButtonDown(1)) { + if (itemStack.stackTagCompound.getInteger("chargeTime") > 0) { + if (!world.isRemote) { + world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0); + world.spawnEntityInWorld(new EntityChargeAir(world, player, 1.0f + ((itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float) itemStack.stackTagCompound + .getInteger("maxChargeTime")))), (itemStack.stackTagCompound.getInteger("chargeTime")) * (2.5D * (1.0D / itemStack.stackTagCompound.getInteger("maxChargeTime"))))); + itemStack.damageItem(1, player); } } - resetData(itemStack); - } - else - { - if (itemStack.stackTagCompound.getBoolean("charging") == true) - { + } else { + if (itemStack.stackTagCompound.getBoolean("charging") == true) { incrementData(itemStack); } } - } - } - else - { + } + } else { resetData(itemStack); } - - if (itemStack.stackTagCompound.getInteger("chargeTime") > itemStack.stackTagCompound.getInteger("maxChargeTime")) - { + if (itemStack.stackTagCompound.getInteger("chargeTime") > itemStack.stackTagCompound.getInteger("maxChargeTime")) { itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("maxChargeTime")); } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); - - if (itemStack.stackTagCompound.getBoolean("charging") == false) - { - itemStack.stackTagCompound.setBoolean("charging", true); - } - - return itemStack; - } - - private void chargeEffect(ItemStack itemStack, World world, EntityPlayer player) - { - double particleX = (player.posX - 0.5D) + rand.nextDouble(); - double particleY = player.posY + (player.height/itemStack.stackTagCompound.getInteger("maxChargeTime") * itemStack.stackTagCompound.getInteger("chargeTime")); - double particleZ = (player.posZ - 0.5D) + rand.nextDouble(); - float particleScale = ((float)(itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float)itemStack.stackTagCompound.getInteger("maxChargeTime")))); + private void chargeEffect(ItemStack itemStack, World world, EntityPlayer player) { + double particleX = (player.posX - 0.5D) + rand.nextDouble(); + double particleY = player.posY + (player.height / itemStack.stackTagCompound.getInteger("maxChargeTime") * itemStack.stackTagCompound.getInteger("chargeTime")); + double particleZ = (player.posZ - 0.5D) + rand.nextDouble(); + float particleScale = ((itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float) itemStack.stackTagCompound.getInteger("maxChargeTime")))); if (!world.isRemote) MysticWorld.proxy.airFeetFX(world, particleX, particleY, particleZ, 1.0f + particleScale, 15); } - - private void resetData(ItemStack itemStack) - { + + private void incrementData(ItemStack itemStack) { + itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("chargeTime") + 1); + } + + private void resetData(ItemStack itemStack) { itemStack.stackTagCompound.setInteger("chargeTime", 0); itemStack.stackTagCompound.setBoolean("charging", false); } - - private void incrementData(ItemStack itemStack) - { - itemStack.stackTagCompound.setInteger("chargeTime", itemStack.stackTagCompound.getInteger("chargeTime") + 1); - } } diff --git a/common/MysticWorld/Items/ItemStaffEarth.java b/common/MysticWorld/Items/ItemStaffEarth.java index 636a1c3..e744c47 100644 --- a/common/MysticWorld/Items/ItemStaffEarth.java +++ b/common/MysticWorld/Items/ItemStaffEarth.java @@ -1,10 +1,7 @@ -package MysticWorld.Items; +package mysticworld.items; -import org.lwjgl.input.Keyboard; - -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeEarth; -import MysticWorld.Entity.EntityChargeFire; +import mysticworld.MysticWorld; +import mysticworld.entity.EntityChargeEarth; import net.minecraft.block.Block; import net.minecraft.block.BlockCocoa; import net.minecraft.block.BlockCrops; @@ -12,14 +9,9 @@ import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockMushroom; import net.minecraft.block.BlockSapling; import net.minecraft.block.BlockStem; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; @@ -28,269 +20,172 @@ import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.event.entity.player.UseHoeEvent; -public class ItemStaffEarth extends ItemStaff -{ - public ItemStaffEarth(int id) - { +import org.lwjgl.input.Keyboard; + +public class ItemStaffEarth extends ItemStaff { + public ItemStaffEarth(int id) { super(id); } - - @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; - ItemStack currentItem = player.inventory.getCurrentItem(); - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + @Override + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); + if (movingobjectposition == null) { + return itemStack; + } else { + if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + if (!world.canMineBlock(entityPlayer, i, j, k)) { + return itemStack; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + if (applyBonemeal(itemStack, world, i, j, k, entityPlayer)) { + if (!world.isRemote) { + world.playAuxSFX(2005, i, j, k, 0); + } + return itemStack; + } + } + } + } + } else { + world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer)); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + return itemStack; + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; + ItemStack currentItem = player.inventory.getCurrentItem(); + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { MysticWorld.proxy.earthFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) - { - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); - if (movingobjectposition == null) - { - return itemStack; - } - else - { - if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(entityPlayer, i, j, k)) - { - return itemStack; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - else - { - if (applyBonemeal(itemStack, world, i, j, k, entityPlayer)) - { - if (!world.isRemote) - { - world.playAuxSFX(2005, i, j, k, 0); - } - return itemStack; - } - } - } - } + public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) { + int l = par1World.getBlockId(par2, par3, par4); + BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4); + if (MinecraftForge.EVENT_BUS.post(event)) { + return false; } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); + if (event.getResult() == Result.ALLOW) { + itemStack.damageItem(1, player); + return true; + } + if (l == Block.sapling.blockID) { + if (!par1World.isRemote) { + if (par1World.rand.nextFloat() < 0.45D) { + ((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); + } + itemStack.damageItem(1, player); } - - return itemStack; + return true; + } else if (l == Block.cobblestone.blockID) { + if (!par1World.isRemote) { + par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID); + } + itemStack.damageItem(1, player); + } else if (l == Block.deadBush.blockID) { + if (!par1World.isRemote) { + par1World.setBlock(par2, par3, par4, 0); + par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1))); + } + itemStack.damageItem(1, player); + } else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) { + if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) { + if (l > 0 && Block.blocksList[l] instanceof BlockCrops) { + if (par1World.getBlockMetadata(par2, par3, par4) == 7) { + return false; + } else { + if (!par1World.isRemote) { + ((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4); + itemStack.damageItem(1, player); + } + return true; + } + } else { + int i1; + int j1; + int k1; + if (l == Block.cocoaPlant.blockID) { + i1 = par1World.getBlockMetadata(par2, par3, par4); + j1 = BlockDirectional.getDirection(i1); + k1 = BlockCocoa.func_72219_c(i1); + if (k1 >= 2) { + return false; + } else { + if (!par1World.isRemote) { + ++k1; + par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2); + itemStack.damageItem(1, player); + } + return true; + } + } else if (l != Block.grass.blockID) { + return false; + } else { + if (!par1World.isRemote) { + itemStack.damageItem(1, player); + label102: for (i1 = 0; i1 < 128; ++i1) { + j1 = par2; + k1 = par3 + 1; + int l1 = par4; + for (int i2 = 0; i2 < i1 / 16; ++i2) { + j1 += itemRand.nextInt(3) - 1; + k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2; + l1 += itemRand.nextInt(3) - 1; + if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) { + continue label102; + } + } + if (par1World.getBlockId(j1, k1, l1) == 0) { + if (itemRand.nextInt(10) != 0) { + if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) { + par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); + } + } else { + ForgeHooks.plantGrass(par1World, j1, k1, l1); + } + } + } + } + return true; + } + } + } else if (par1World.getBlockMetadata(par2, par3, par4) == 7) { + return false; + } else { + if (!par1World.isRemote) { + ((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); + itemStack.damageItem(1, player); + } + return true; + } + } else { + if (!par1World.isRemote) { + if (par1World.rand.nextFloat() < 0.4D) { + ((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); + } + itemStack.damageItem(1, player); + } + return true; } - - return itemStack; + return true; } - - public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) - { - int l = par1World.getBlockId(par2, par3, par4); - - BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - if (event.getResult() == Result.ALLOW) - { - itemStack.damageItem(1, player); - - return true; - } - - if (l == Block.sapling.blockID) - { - if (!par1World.isRemote) - { - if ((double)par1World.rand.nextFloat() < 0.45D) - { - ((BlockSapling)Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); - } - itemStack.damageItem(1, player); - } - return true; - } - else if (l == Block.cobblestone.blockID) - { - if (!par1World.isRemote) - { - par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID); - } - - itemStack.damageItem(1, player); - } - else if (l == Block.deadBush.blockID) - { - if (!par1World.isRemote) - { - par1World.setBlock(par2, par3, par4, 0); - par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1))); - } - - itemStack.damageItem(1, player); - } - else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) - { - if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) - { - if (l > 0 && Block.blocksList[l] instanceof BlockCrops) - { - if (par1World.getBlockMetadata(par2, par3, par4) == 7) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ((BlockCrops)Block.blocksList[l]).fertilize(par1World, par2, par3, par4); - itemStack.damageItem(1, player); - } - - return true; - } - } - else - { - int i1; - int j1; - int k1; - - if (l == Block.cocoaPlant.blockID) - { - i1 = par1World.getBlockMetadata(par2, par3, par4); - j1 = BlockDirectional.getDirection(i1); - k1 = BlockCocoa.func_72219_c(i1); - - if (k1 >= 2) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ++k1; - par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2); - itemStack.damageItem(1, player); - } - - return true; - } - } - else if (l != Block.grass.blockID) - { - return false; - } - else - { - if (!par1World.isRemote) - { - itemStack.damageItem(1, player); - label102: - - for (i1 = 0; i1 < 128; ++i1) - { - j1 = par2; - k1 = par3 + 1; - int l1 = par4; - - for (int i2 = 0; i2 < i1 / 16; ++i2) - { - j1 += itemRand.nextInt(3) - 1; - k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2; - l1 += itemRand.nextInt(3) - 1; - - if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) - { - continue label102; - } - } - - if (par1World.getBlockId(j1, k1, l1) == 0) - { - if (itemRand.nextInt(10) != 0) - { - if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) - { - par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); - } - } - else - { - ForgeHooks.plantGrass(par1World, j1, k1, l1); - } - } - } - } - - return true; - } - } - } - else if (par1World.getBlockMetadata(par2, par3, par4) == 7) - { - return false; - } - else - { - if (!par1World.isRemote) - { - ((BlockStem)Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); - itemStack.damageItem(1, player); - } - - return true; - } - } - else - { - if (!par1World.isRemote) - { - if ((double)par1World.rand.nextFloat() < 0.4D) - { - ((BlockMushroom)Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); - } - - itemStack.damageItem(1, player); - } - - return true; - } - - return true; - } } diff --git a/common/MysticWorld/Items/ItemStaffEnegy.java b/common/MysticWorld/Items/ItemStaffEnegy.java index 66c8e87..47c5544 100644 --- a/common/MysticWorld/Items/ItemStaffEnegy.java +++ b/common/MysticWorld/Items/ItemStaffEnegy.java @@ -1,17 +1,10 @@ -package MysticWorld.Items; +package mysticworld.items; -import org.lwjgl.input.Keyboard; - -import MysticWorld.MysticWorld; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Entity.EntityChargeEnergy; -import MysticWorld.Entity.EntityChargeFire; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; +import mysticworld.MysticWorld; +import mysticworld.blocks.BlockHandler; +import mysticworld.entity.EntityChargeEnergy; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -19,126 +12,83 @@ import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import org.lwjgl.input.Keyboard; + public class ItemStaffEnegy extends ItemStaff { - public ItemStaffEnegy(int id) { super(id); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); + if (movingobjectposition == null) { + return itemStack; + } else { + if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + if (!world.canMineBlock(entityPlayer, i, j, k)) { + return itemStack; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + if (movingobjectposition.sideHit == 0) { + --j; + } + if (movingobjectposition.sideHit == 1) { + ++j; + } + if (movingobjectposition.sideHit == 2) { + --k; + } + if (movingobjectposition.sideHit == 3) { + ++k; + } + if (movingobjectposition.sideHit == 4) { + --i; + } + if (movingobjectposition.sideHit == 5) { + ++i; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + if (world.isAirBlock(i, j, k)) { + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlock(i, j, k, BlockHandler.lightCube.blockID); + } + itemStack.damageItem(1, entityPlayer); + return itemStack; + } + } + } + } + } else { + world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer)); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + return itemStack; + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 20, 2)); MysticWorld.proxy.energyFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) - { - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); - - if (movingobjectposition == null) - { - return itemStack; - } - else - { - if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(entityPlayer, i, j, k)) - { - return itemStack; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - - else - { - if (movingobjectposition.sideHit == 0) - { - --j; - } - - if (movingobjectposition.sideHit == 1) - { - ++j; - } - - if (movingobjectposition.sideHit == 2) - { - --k; - } - - if (movingobjectposition.sideHit == 3) - { - ++k; - } - - if (movingobjectposition.sideHit == 4) - { - --i; - } - - if (movingobjectposition.sideHit == 5) - { - ++i; - } - - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - else - { - if (world.isAirBlock(i, j, k)) - { - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlock(i, j, k, BlockHandler.lightCube.blockID); - } - - itemStack.damageItem(1, entityPlayer); - return itemStack; - } - } - } - } - } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } - - return itemStack; - } - return itemStack; - } - } diff --git a/common/MysticWorld/Items/ItemStaffFire.java b/common/MysticWorld/Items/ItemStaffFire.java index 763e054..adf3916 100644 --- a/common/MysticWorld/Items/ItemStaffFire.java +++ b/common/MysticWorld/Items/ItemStaffFire.java @@ -1,22 +1,11 @@ -package MysticWorld.Items; +package mysticworld.items; -import java.util.Arrays; -import java.util.Random; - -import org.lwjgl.input.Keyboard; - -import MysticWorld.MysticWorld; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Entity.EntityChargeFire; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; +import mysticworld.MysticWorld; +import mysticworld.entity.EntityChargeFire; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.potion.Potion; @@ -26,114 +15,82 @@ import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import org.lwjgl.input.Keyboard; + public class ItemStaffFire extends ItemStaff { - public ItemStaffFire(int id) { super(id); } - + + public boolean itemInteractionForEntity(ItemStack itemStack, EntityLiving entityLiving) { + if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + entityLiving.setFire(5); + entityLiving.attackEntityFrom(DamageSource.magic, 7); + itemStack.damageItem(1, entityLiving); + return true; + } + return true; + } + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); + if (movingobjectposition == null) { + return itemStack; + } else { + if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + if (!world.canMineBlock(entityPlayer, i, j, k)) { + return itemStack; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(world.getBlockId(i, j, k), 1, world.getBlockMetadata(i, j, k))); + if (!world.isRemote && !(result == null)) { + int id = result.itemID; + int meta = result.getItemDamage(); + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlock(i, j, k, 0); + world.spawnEntityInWorld(new EntityItem(world, i, j, k, new ItemStack(id, 1, meta))); + itemStack.damageItem(1, entityPlayer); + } + } + } + } + } else { + world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer)); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + return itemStack; + } + + @Override + public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer entityPlayer, Entity entity) { + entity.setFire(5); + entity.attackEntityFrom(DamageSource.magic, 7); + itemStack.damageItem(1, entityPlayer); + return true; + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { player.addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 20, 0)); MysticWorld.proxy.fireFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - public boolean itemInteractionForEntity(ItemStack itemStack, EntityLiving entityLiving) - { - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - entityLiving.setFire(5); - entityLiving.attackEntityFrom(DamageSource.magic, 7); - - itemStack.damageItem(1, entityLiving); - - return true; - } - return true; - } - - public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer entityPlayer, Entity entity) - { - entity.setFire(5); - entity.attackEntityFrom(DamageSource.magic, 7); - - itemStack.damageItem(1, entityPlayer); - - return true; - } - - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) - { - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); - - if (movingobjectposition == null) - { - return itemStack; - } - else - { - if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(entityPlayer, i, j, k)) - { - return itemStack; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - else - { - ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(world.getBlockId(i, j, k), 1, world.getBlockMetadata(i, j, k))); - - if (!world.isRemote && !(result == null)) - { - int id = result.itemID; - int meta = result.getItemDamage(); - - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlock(i, j, k, 0); - world.spawnEntityInWorld(new EntityItem(world, i, j, k, new ItemStack(id, 1, meta))); - itemStack.damageItem(1, entityPlayer); - } - } - } - } - } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } - - return itemStack; - } - return itemStack; - } - } diff --git a/common/MysticWorld/Items/ItemStaffParts.java b/common/MysticWorld/Items/ItemStaffParts.java index 85cbca4..0ce6633 100644 --- a/common/MysticWorld/Items/ItemStaffParts.java +++ b/common/MysticWorld/Items/ItemStaffParts.java @@ -1,71 +1,60 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.List; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import MysticWorld.MysticWorld; -import MysticWorld.Lib.Strings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemStaffParts extends Item { - private Icon[] icons; - - private static final String[] STAFF_PARTS = new String[] {"Staff", "Hilt", "Handle", "Head"}; - - public ItemStaffParts(int id) - { + private static final String[] STAFF_PARTS = new String[] { "Staff", "Hilt", "Handle", "Head" }; + + public ItemStaffParts(int id) { super(id); - this.setHasSubtypes(true); - this.setCreativeTab(MysticWorld.MysticWorldTab); + this.setHasSubtypes(true); + this.setCreativeTab(MysticWorld.MysticWorldTab); } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); - return STAFF_PARTS[meta]; - } - + @Override - @SideOnly(Side.CLIENT) - public boolean isFull3D() - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { - icons = new Icon[STAFF_PARTS.length]; - - for (int i = 0; i < STAFF_PARTS.length; ++i) { - icons[i] = iconRegister.registerIcon("MysticMods:StaffPart_" + STAFF_PARTS[i]); - } - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { - int j = MathHelper.clamp_int(meta, 0, STAFF_PARTS.length); - return icons[j]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { - for (int var4 = 0; var4 < STAFF_PARTS.length; var4++){ - par3List.add(new ItemStack(par1, 1, var4)); - } - } - + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, STAFF_PARTS.length); + return icons[j]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int var4 = 0; var4 < STAFF_PARTS.length; var4++) { + par3List.add(new ItemStack(par1, 1, var4)); + } + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return STAFF_PARTS[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean isFull3D() { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[STAFF_PARTS.length]; + for (int i = 0; i < STAFF_PARTS.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticMods:StaffPart_" + STAFF_PARTS[i]); + } + } } diff --git a/common/MysticWorld/Items/ItemStaffPower.java b/common/MysticWorld/Items/ItemStaffPower.java index 1897462..86736ca 100644 --- a/common/MysticWorld/Items/ItemStaffPower.java +++ b/common/MysticWorld/Items/ItemStaffPower.java @@ -1,55 +1,43 @@ -package MysticWorld.Items; +package mysticworld.items; -import java.util.List; - -import MysticWorld.Util.Reference; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemStaffPower extends Item { - private Icon[] icons; - - private static final String[] CHARGE_NAMES = new String[] { "Fire", "Water", "Earth", "Air", "Energy"}; + private static final String[] CHARGE_NAMES = new String[] { "Fire", "Water", "Earth", "Air", "Energy" }; - public ItemStaffPower(int id) - { + public ItemStaffPower(int id) { super(id); - this.setHasSubtypes(true); - this.setCreativeTab(null); - maxStackSize = 64; + this.setHasSubtypes(true); + this.setCreativeTab(null); + maxStackSize = 64; } - - @Override - public String getUnlocalizedName(ItemStack itemStack) { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); - return super.getUnlocalizedName() + CHARGE_NAMES[meta]; - } - - @Override + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - icons = new Icon[CHARGE_NAMES.length]; - - for (int i = 0; i < CHARGE_NAMES.length; ++i) { - icons[i] = iconRegister.registerIcon("MysticMods:Charge" + CHARGE_NAMES[i]); - } + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, 5); + return icons[j]; } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { - int j = MathHelper.clamp_int(meta, 0, 5); - return icons[j]; - } + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + CHARGE_NAMES[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[CHARGE_NAMES.length]; + for (int i = 0; i < CHARGE_NAMES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticMods:Charge" + CHARGE_NAMES[i]); + } + } } - diff --git a/common/MysticWorld/Items/ItemStaffWater.java b/common/MysticWorld/Items/ItemStaffWater.java index e9d9ae7..1f2264f 100644 --- a/common/MysticWorld/Items/ItemStaffWater.java +++ b/common/MysticWorld/Items/ItemStaffWater.java @@ -1,160 +1,102 @@ -package MysticWorld.Items; +package mysticworld.items; -import org.lwjgl.input.Keyboard; - -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeEarth; -import MysticWorld.Entity.EntityChargeFire; -import MysticWorld.Entity.EntityChargeWater; +import mysticworld.MysticWorld; +import mysticworld.entity.EntityChargeWater; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.Event.Result; -import net.minecraftforge.event.entity.player.UseHoeEvent; + +import org.lwjgl.input.Keyboard; public class ItemStaffWater extends ItemStaff { - public ItemStaffWater(int id) { super(id); this.setMaxStackSize(1); this.setMaxDamage(200); this.setCreativeTab(MysticWorld.MysticWorldTab); } - + @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) - { - EntityPlayer player = (EntityPlayer)entity; + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); + if (movingobjectposition == null) { + return itemStack; + } else { + if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + if (!world.canMineBlock(entityPlayer, i, j, k)) { + return itemStack; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } + if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) { + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlockToAir(i, j, k); + itemStack.damageItem(1, entityPlayer); + return itemStack; + } else { + if (movingobjectposition.sideHit == 0) { + --j; + } + if (movingobjectposition.sideHit == 1) { + ++j; + } + if (movingobjectposition.sideHit == 2) { + --k; + } + if (movingobjectposition.sideHit == 3) { + ++k; + } + if (movingobjectposition.sideHit == 4) { + --i; + } + if (movingobjectposition.sideHit == 5) { + ++i; + } + if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) { + return itemStack; + } else { + int i1 = world.getBlockId(i, j, k); + if (i1 == 0) { + world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.setBlock(i, j, k, Block.waterMoving.blockID); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + } + } + return itemStack; + } + } else { + world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityChargeWater(world, entityPlayer)); + itemStack.damageItem(1, entityPlayer); + } + return itemStack; + } + } + + @Override + public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { + EntityPlayer player = (EntityPlayer) entity; ItemStack currentItem = player.inventory.getCurrentItem(); - - if (!world.isRemote) - { - if (currentItem != null) - { - if (currentItem.itemID == itemStack.itemID) - { + if (!world.isRemote) { + if (currentItem != null) { + if (currentItem.itemID == itemStack.itemID) { MysticWorld.proxy.waterFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } } } } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true); - - if (movingobjectposition == null) - { - return itemStack; - } - else - { - if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(entityPlayer, i, j, k)) - { - return itemStack; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - - if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) - { - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlockToAir(i, j, k); - - itemStack.damageItem(1, entityPlayer); - - return itemStack; - } - else - { - if (movingobjectposition.sideHit == 0) - { - --j; - } - - if (movingobjectposition.sideHit == 1) - { - ++j; - } - - if (movingobjectposition.sideHit == 2) - { - --k; - } - - if (movingobjectposition.sideHit == 3) - { - ++k; - } - - if (movingobjectposition.sideHit == 4) - { - --i; - } - - if (movingobjectposition.sideHit == 5) - { - ++i; - } - - if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) - { - return itemStack; - } - else - { - int i1 = world.getBlockId(i, j, k); - - if (i1 == 0) - { - world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - world.setBlock(i, j, k, Block.waterMoving.blockID); - itemStack.damageItem(1, entityPlayer); - } - - return itemStack; - } - } - } - - return itemStack; - } - } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeWater(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } - - return itemStack; - } - } - } \ No newline at end of file diff --git a/common/MysticWorld/Items/ItemVoidShard.java b/common/MysticWorld/Items/ItemVoidShard.java index b9e2e89..efeae6f 100644 --- a/common/MysticWorld/Items/ItemVoidShard.java +++ b/common/MysticWorld/Items/ItemVoidShard.java @@ -1,95 +1,72 @@ -package MysticWorld.Items; +package mysticworld.items; import java.util.List; -import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import MysticWorld.MysticWorld; -import MysticWorld.Entity.EntityChargeAir; +import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemVoidShard extends Item { - public ItemVoidShard(int id) { super(id); this.setMaxStackSize(1); this.setCreativeTab(MysticWorld.MysticWorldTab); this.setMaxDamage(1); } - + @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) - { + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) { if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); - + itemStack.setTagCompound(new NBTTagCompound()); + list.add("Experience Stored: " + Integer.toString(itemStack.stackTagCompound.getInteger("xpStored"))); + } + + @Override + public boolean hasEffect(ItemStack itemStack) { + if (itemStack.stackTagCompound == null) + itemStack.setTagCompound(new NBTTagCompound()); + if (itemStack.stackTagCompound.hasKey("filled")) { + return itemStack.stackTagCompound.getBoolean("filled"); + } else { + return false; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { + if (itemStack.stackTagCompound == null) + itemStack.setTagCompound(new NBTTagCompound()); int experience = entityPlayer.experienceLevel; int experienceSubtract = entityPlayer.experienceLevel - 30; - - if (itemStack.stackTagCompound.getBoolean("filled") == false) - { - if (experience > 0 && experience <= 30) - { + if (itemStack.stackTagCompound.getBoolean("filled") == false) { + if (experience > 0 && experience <= 30) { entityPlayer.experienceLevel = 0; itemStack.stackTagCompound.setInteger("xpStored", experience); itemStack.stackTagCompound.setBoolean("filled", true); - } - else if (experience > 30) - { + } else if (experience > 30) { entityPlayer.experienceLevel = experienceSubtract; itemStack.stackTagCompound.setInteger("xpStored", 30); itemStack.stackTagCompound.setBoolean("filled", true); } - } - else - { + } else { entityPlayer.experienceLevel += itemStack.stackTagCompound.getInteger("xpStored"); itemStack.stackTagCompound.setInteger("xpStored", 0); itemStack.stackTagCompound.setBoolean("filled", false); itemStack.damageItem(2, entityPlayer); } - return itemStack; } - - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) - { - if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); - - list.add("Experience Stored: " + Integer.toString(itemStack.stackTagCompound.getInteger("xpStored"))); - } - - @Override - public boolean hasEffect(ItemStack itemStack) - { - if (itemStack.stackTagCompound == null) - itemStack.setTagCompound(new NBTTagCompound()); - - if (itemStack.stackTagCompound.hasKey("filled")) - { - return itemStack.stackTagCompound.getBoolean("filled"); - } - else - { - return false; - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - itemIcon = iconRegister.registerIcon("MysticMods:ShardVoid"); - } - + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + itemIcon = iconRegister.registerIcon("MysticMods:ShardVoid"); + } } diff --git a/common/MysticWorld/Lib/BlockIds.java b/common/MysticWorld/Lib/BlockIds.java index 37f21b6..e2b223f 100644 --- a/common/MysticWorld/Lib/BlockIds.java +++ b/common/MysticWorld/Lib/BlockIds.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class BlockIds { diff --git a/common/MysticWorld/Lib/Booleans.java b/common/MysticWorld/Lib/Booleans.java index 8ebf397..8284535 100644 --- a/common/MysticWorld/Lib/Booleans.java +++ b/common/MysticWorld/Lib/Booleans.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class Booleans { diff --git a/common/MysticWorld/Lib/EntityIds.java b/common/MysticWorld/Lib/EntityIds.java index 78b89ef..dac5313 100644 --- a/common/MysticWorld/Lib/EntityIds.java +++ b/common/MysticWorld/Lib/EntityIds.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class EntityIds { diff --git a/common/MysticWorld/Lib/ItemIds.java b/common/MysticWorld/Lib/ItemIds.java index 718db81..467b451 100644 --- a/common/MysticWorld/Lib/ItemIds.java +++ b/common/MysticWorld/Lib/ItemIds.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class ItemIds { diff --git a/common/MysticWorld/Lib/RenderIds.java b/common/MysticWorld/Lib/RenderIds.java index 18a42cd..fae636e 100644 --- a/common/MysticWorld/Lib/RenderIds.java +++ b/common/MysticWorld/Lib/RenderIds.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class RenderIds { diff --git a/common/MysticWorld/Lib/Strings.java b/common/MysticWorld/Lib/Strings.java index 58c5f4d..e5b811a 100644 --- a/common/MysticWorld/Lib/Strings.java +++ b/common/MysticWorld/Lib/Strings.java @@ -1,4 +1,4 @@ -package MysticWorld.Lib; +package mysticworld.lib; public class Strings { diff --git a/common/MysticWorld/Model/ModelOrb.java b/common/MysticWorld/Model/ModelOrb.java index c63b9fd..9d007eb 100644 --- a/common/MysticWorld/Model/ModelOrb.java +++ b/common/MysticWorld/Model/ModelOrb.java @@ -1,23 +1,17 @@ -package MysticWorld.Model; - -import org.lwjgl.opengl.GL11; +package mysticworld.model; import net.minecraft.client.model.ModelBase; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; public class ModelOrb extends ModelBase { - private IModelCustom modelOrb; - - public ModelOrb() - { + + public ModelOrb() { modelOrb = AdvancedModelLoader.loadModel("/assets/mysticmods/models/orb.obj"); } - - public void render() - { + + public void render() { modelOrb.renderAll(); } - } diff --git a/common/MysticWorld/Model/ModelPillarInsert.java b/common/MysticWorld/Model/ModelPillarInsert.java index 019decb..7a785d0 100644 --- a/common/MysticWorld/Model/ModelPillarInsert.java +++ b/common/MysticWorld/Model/ModelPillarInsert.java @@ -1,4 +1,4 @@ -package MysticWorld.Model; +package mysticworld.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/common/MysticWorld/Model/ModelStaff.java b/common/MysticWorld/Model/ModelStaff.java index 4381e32..15bcb18 100644 --- a/common/MysticWorld/Model/ModelStaff.java +++ b/common/MysticWorld/Model/ModelStaff.java @@ -1,4 +1,4 @@ -package MysticWorld.Model; +package mysticworld.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/common/MysticWorld/MysticWorld.java b/common/MysticWorld/MysticWorld.java index 066f423..62d4664 100644 --- a/common/MysticWorld/MysticWorld.java +++ b/common/MysticWorld/MysticWorld.java @@ -1,84 +1,45 @@ -package MysticWorld; +package mysticworld; import java.io.File; -import java.lang.reflect.Array; -import java.util.Random; -import java.util.Set; -import MysticWorld.Biome.BiomeHandler; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Entity.EntityHandler; -import MysticWorld.Items.ItemHandler$1; -import MysticWorld.Lib.Strings; -import MysticWorld.TileEntity.TileEntityHandler; -import MysticWorld.Util.CommonProxy; -import MysticWorld.Util.Config; -import MysticWorld.Util.Localizations; -import MysticWorld.Util.RecipeHandler; -import MysticWorld.Util.Reference; -import MysticWorld.Util.TabMysticWorld; -import MysticWorld.Util.TickHandler; -import MysticWorld.WorldGen.*; -import net.minecraft.block.Block; +import mysticworld.biome.BiomeHandler; +import mysticworld.blocks.BlockHandler; +import mysticworld.entity.EntityHandler; +import mysticworld.items.ItemHandler$1; +import mysticworld.tiles.TileEntityHandler; +import mysticworld.util.CommonProxy; +import mysticworld.util.Config; +import mysticworld.util.Localizations; +import mysticworld.util.RecipeHandler; +import mysticworld.util.Reference; +import mysticworld.util.TabMysticWorld; +import mysticworld.util.TickHandler; +import mysticworld.worldgen.WorldGenHandler$1; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.WorldType; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.Mod.PostInit; -import cpw.mods.fml.common.Mod.PreInit; -import cpw.mods.fml.common.Mod.ServerStarted; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartedEvent; import cpw.mods.fml.common.network.NetworkMod; -import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.TickRegistry; -import cpw.mods.fml.common.registry.VillagerRegistry; import cpw.mods.fml.relauncher.Side; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION_NUMBER) @NetworkMod(clientSideRequired = true, serverSideRequired = false) - -public class MysticWorld -{ +public class MysticWorld { @Instance(Reference.MOD_ID) - public static MysticWorld instance; - + public static MysticWorld instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) - public static CommonProxy proxy; - + public static CommonProxy proxy; private TickHandler tickHandler; - public static CreativeTabs MysticWorldTab = new TabMysticWorld(CreativeTabs.getNextID(), "MysticWorldTab"); - + @EventHandler - public void preInit(FMLPreInitializationEvent event) - { - Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic World.cfg")); - Config.save(); - - BiomeHandler.init(); - - instance = this; - } - - @EventHandler - public void load(FMLInitializationEvent event) - { + public void load(FMLInitializationEvent event) { this.tickHandler = new TickHandler(); - - TickRegistry.registerTickHandler(this.tickHandler, Side.SERVER); + TickRegistry.registerTickHandler(this.tickHandler, Side.SERVER); BlockHandler.init(); ItemHandler$1.init(); TileEntityHandler.init(); @@ -86,8 +47,15 @@ public class MysticWorld EntityHandler.init(); RecipeHandler.init(); Localizations.Initialize(); - proxy.registerRenderIDs(); proxy.registerRenders(); } + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic World.cfg")); + Config.save(); + BiomeHandler.init(); + instance = this; + } } diff --git a/common/MysticWorld/Renderer/BlockPillarInsertRenderer.java b/common/MysticWorld/Renderer/BlockPillarInsertRenderer.java index 6ed1c1f..4f9354c 100644 --- a/common/MysticWorld/Renderer/BlockPillarInsertRenderer.java +++ b/common/MysticWorld/Renderer/BlockPillarInsertRenderer.java @@ -1,50 +1,41 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelPillarInsert; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.ForgeHooksClient; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import MysticWorld.Model.ModelPillarInsert; -import net.minecraftforge.client.IItemRenderer; - public class BlockPillarInsertRenderer implements IItemRenderer { - private static final ResourceLocation texture = new ResourceLocation("mysticmods:textures" + "/models/PillarInsert.png"); private final ModelPillarInsert model; - - public BlockPillarInsertRenderer() - { + + public BlockPillarInsertRenderer() { this.model = new ModelPillarInsert(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, -1.0F, 0.0F, 1.0F); break; @@ -61,21 +52,21 @@ public class BlockPillarInsertRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale){ + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return true; + } + + private void renderModel(float x, float y, float z, float scale) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(0.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(texture); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture); model.renderModel(0.0625f); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { - return true; - } } diff --git a/common/MysticWorld/Renderer/ItemOrbAirRenderer.java b/common/MysticWorld/Renderer/ItemOrbAirRenderer.java index 5831316..d76d1cd 100644 --- a/common/MysticWorld/Renderer/ItemOrbAirRenderer.java +++ b/common/MysticWorld/Renderer/ItemOrbAirRenderer.java @@ -1,47 +1,72 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelOrb; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import MysticWorld.Model.ModelOrb; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; - public class ItemOrbAirRenderer implements IItemRenderer { + private ModelOrb modelOrb; - private ModelOrb modelOrb; - - public ItemOrbAirRenderer() - { - modelOrb = new ModelOrb(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + public ItemOrbAirRenderer() { + modelOrb = new ModelOrb(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { + case ENTITY: + renderOrb(0.0f, 0.5f, 0.0f, 0.4f); + break; + case EQUIPPED: + renderOrb(0.5f, 1.0f, 0.5f, 0.5f); + break; + case INVENTORY: + renderOrb(0.0f, 0.0f, 0.0f, 0.5f); + break; + case EQUIPPED_FIRST_PERSON: + renderOrb(0.0f, 1.0f, 1.0f, 0.5f); + break; + default: + break; + } + } + + public void renderOrb(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glTranslatef(x, y, z); + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180f, 0f, 1f, 0f); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/OrbAir.png")); + modelOrb.render(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -54,45 +79,4 @@ public class ItemOrbAirRenderer implements IItemRenderer { return false; } } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type){ - case ENTITY: - renderOrb(0.0f, 0.5f, 0.0f, 0.4f); - break; - case EQUIPPED: - renderOrb(0.5f, 1.0f, 0.5f, 0.5f); - break; - case INVENTORY: - renderOrb(0.0f, 0.0f, 0.0f, 0.5f); - break; - case EQUIPPED_FIRST_PERSON: - renderOrb(0.0f, 1.0f, 1.0f, 0.5f); - break; - default: - break; - } - } - - public void renderOrb(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/OrbAir.png")); - - modelOrb.render(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - - } diff --git a/common/MysticWorld/Renderer/ItemOrbEarthRenderer.java b/common/MysticWorld/Renderer/ItemOrbEarthRenderer.java index 984e63f..2a6c826 100644 --- a/common/MysticWorld/Renderer/ItemOrbEarthRenderer.java +++ b/common/MysticWorld/Renderer/ItemOrbEarthRenderer.java @@ -1,47 +1,72 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelOrb; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import MysticWorld.Model.ModelOrb; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; - public class ItemOrbEarthRenderer implements IItemRenderer { + private ModelOrb modelOrb; - private ModelOrb modelOrb; - - public ItemOrbEarthRenderer() - { - modelOrb = new ModelOrb(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + public ItemOrbEarthRenderer() { + modelOrb = new ModelOrb(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { + case ENTITY: + renderOrb(0.0f, 0.5f, 0.0f, 0.4f); + break; + case EQUIPPED: + renderOrb(0.5f, 1.0f, 0.5f, 0.5f); + break; + case INVENTORY: + renderOrb(0.0f, 0.0f, 0.0f, 0.5f); + break; + case EQUIPPED_FIRST_PERSON: + renderOrb(0.0f, 1.0f, 1.0f, 0.5f); + break; + default: + break; + } + } + + public void renderOrb(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glTranslatef(x, y, z); + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180f, 0f, 1f, 0f); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/OrbEarth.png")); + modelOrb.render(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -54,45 +79,4 @@ public class ItemOrbEarthRenderer implements IItemRenderer { return false; } } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type){ - case ENTITY: - renderOrb(0.0f, 0.5f, 0.0f, 0.4f); - break; - case EQUIPPED: - renderOrb(0.5f, 1.0f, 0.5f, 0.5f); - break; - case INVENTORY: - renderOrb(0.0f, 0.0f, 0.0f, 0.5f); - break; - case EQUIPPED_FIRST_PERSON: - renderOrb(0.0f, 1.0f, 1.0f, 0.5f); - break; - default: - break; - } - } - - public void renderOrb(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/OrbEarth.png")); - - modelOrb.render(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - - } diff --git a/common/MysticWorld/Renderer/ItemOrbEnergyRenderer.java b/common/MysticWorld/Renderer/ItemOrbEnergyRenderer.java index 6f52b9f..0022f0c 100644 --- a/common/MysticWorld/Renderer/ItemOrbEnergyRenderer.java +++ b/common/MysticWorld/Renderer/ItemOrbEnergyRenderer.java @@ -1,47 +1,72 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelOrb; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import MysticWorld.Model.ModelOrb; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; - public class ItemOrbEnergyRenderer implements IItemRenderer { + private ModelOrb modelOrb; - private ModelOrb modelOrb; - - public ItemOrbEnergyRenderer() - { - modelOrb = new ModelOrb(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + public ItemOrbEnergyRenderer() { + modelOrb = new ModelOrb(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { + case ENTITY: + renderOrb(0.0f, 0.5f, 0.0f, 0.4f); + break; + case EQUIPPED: + renderOrb(0.5f, 1.0f, 0.5f, 0.5f); + break; + case INVENTORY: + renderOrb(0.0f, 0.0f, 0.0f, 0.5f); + break; + case EQUIPPED_FIRST_PERSON: + renderOrb(0.0f, 1.0f, 1.0f, 0.5f); + break; + default: + break; + } + } + + public void renderOrb(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glTranslatef(x, y, z); + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180f, 0f, 1f, 0f); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/OrbEnergy.png")); + modelOrb.render(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -54,45 +79,4 @@ public class ItemOrbEnergyRenderer implements IItemRenderer { return false; } } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type){ - case ENTITY: - renderOrb(0.0f, 0.5f, 0.0f, 0.4f); - break; - case EQUIPPED: - renderOrb(0.5f, 1.0f, 0.5f, 0.5f); - break; - case INVENTORY: - renderOrb(0.0f, 0.0f, 0.0f, 0.5f); - break; - case EQUIPPED_FIRST_PERSON: - renderOrb(0.0f, 1.0f, 1.0f, 0.5f); - break; - default: - break; - } - } - - public void renderOrb(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/OrbEnergy.png")); - - modelOrb.render(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - - } diff --git a/common/MysticWorld/Renderer/ItemOrbFireRenderer.java b/common/MysticWorld/Renderer/ItemOrbFireRenderer.java index 250fd4a..48c3adc 100644 --- a/common/MysticWorld/Renderer/ItemOrbFireRenderer.java +++ b/common/MysticWorld/Renderer/ItemOrbFireRenderer.java @@ -1,47 +1,72 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelOrb; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import MysticWorld.Model.ModelOrb; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; - public class ItemOrbFireRenderer implements IItemRenderer { + private ModelOrb modelOrb; - private ModelOrb modelOrb; - - public ItemOrbFireRenderer() - { - modelOrb = new ModelOrb(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + public ItemOrbFireRenderer() { + modelOrb = new ModelOrb(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { + case ENTITY: + renderOrb(0.0f, 0.5f, 0.0f, 0.4f); + break; + case EQUIPPED: + renderOrb(0.5f, 1.0f, 0.5f, 0.5f); + break; + case INVENTORY: + renderOrb(0.0f, 0.0f, 0.0f, 0.5f); + break; + case EQUIPPED_FIRST_PERSON: + renderOrb(0.0f, 1.0f, 1.0f, 0.5f); + break; + default: + break; + } + } + + public void renderOrb(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glTranslatef(x, y, z); + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180f, 0f, 1f, 0f); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/OrbFire.png")); + modelOrb.render(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -54,45 +79,4 @@ public class ItemOrbFireRenderer implements IItemRenderer { return false; } } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type){ - case ENTITY: - renderOrb(0.0f, 0.5f, 0.0f, 0.4f); - break; - case EQUIPPED: - renderOrb(0.5f, 1.0f, 0.5f, 0.5f); - break; - case INVENTORY: - renderOrb(0.0f, 0.0f, 0.0f, 0.5f); - break; - case EQUIPPED_FIRST_PERSON: - renderOrb(0.0f, 1.0f, 1.0f, 0.5f); - break; - default: - break; - } - } - - public void renderOrb(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/OrbFire.png")); - - modelOrb.render(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - - } diff --git a/common/MysticWorld/Renderer/ItemOrbWaterRenderer.java b/common/MysticWorld/Renderer/ItemOrbWaterRenderer.java index b0a1e0b..d756667 100644 --- a/common/MysticWorld/Renderer/ItemOrbWaterRenderer.java +++ b/common/MysticWorld/Renderer/ItemOrbWaterRenderer.java @@ -1,47 +1,72 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; + +import mysticworld.model.ModelOrb; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; -import MysticWorld.Model.ModelOrb; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; - public class ItemOrbWaterRenderer implements IItemRenderer { + private ModelOrb modelOrb; - private ModelOrb modelOrb; - - public ItemOrbWaterRenderer() - { - modelOrb = new ModelOrb(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + public ItemOrbWaterRenderer() { + modelOrb = new ModelOrb(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { + case ENTITY: + renderOrb(0.0f, 0.5f, 0.0f, 0.4f); + break; + case EQUIPPED: + renderOrb(0.5f, 1.0f, 0.5f, 0.5f); + break; + case INVENTORY: + renderOrb(0.0f, 0.0f, 0.0f, 0.5f); + break; + case EQUIPPED_FIRST_PERSON: + renderOrb(0.0f, 1.0f, 1.0f, 0.5f); + break; + default: + break; + } + } + + public void renderOrb(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glTranslatef(x, y, z); + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180f, 0f, 1f, 0f); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/OrbWater.png")); + modelOrb.render(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -54,45 +79,4 @@ public class ItemOrbWaterRenderer implements IItemRenderer { return false; } } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type){ - case ENTITY: - renderOrb(0.0f, 0.5f, 0.0f, 0.4f); - break; - case EQUIPPED: - renderOrb(0.5f, 1.0f, 0.5f, 0.5f); - break; - case INVENTORY: - renderOrb(0.0f, 0.0f, 0.0f, 0.5f); - break; - case EQUIPPED_FIRST_PERSON: - renderOrb(0.0f, 1.0f, 1.0f, 0.5f); - break; - default: - break; - } - } - - public void renderOrb(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/OrbWater.png")); - - modelOrb.render(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - - } diff --git a/common/MysticWorld/Renderer/ItemStaffAirRenderer.java b/common/MysticWorld/Renderer/ItemStaffAirRenderer.java index 6e13af5..a232d72 100644 --- a/common/MysticWorld/Renderer/ItemStaffAirRenderer.java +++ b/common/MysticWorld/Renderer/ItemStaffAirRenderer.java @@ -1,47 +1,40 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelStaff; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelStaff; - import cpw.mods.fml.client.FMLClientHandler; public class ItemStaffAirRenderer implements IItemRenderer { - private final ModelStaff model; - - public ItemStaffAirRenderer() - { + + public ItemStaffAirRenderer() { this.model = new ModelStaff(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, 1.2F, 0.0F, 1.0F); break; @@ -58,39 +51,10 @@ public class ItemStaffAirRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffAir.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - private void renderModelEquipped(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffAir.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -103,4 +67,29 @@ public class ItemStaffAirRenderer implements IItemRenderer { return false; } } + + private void renderModel(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffAir.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + private void renderModelEquipped(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffAir.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } } diff --git a/common/MysticWorld/Renderer/ItemStaffEarthRenderer.java b/common/MysticWorld/Renderer/ItemStaffEarthRenderer.java index a89e9a0..46f9853 100644 --- a/common/MysticWorld/Renderer/ItemStaffEarthRenderer.java +++ b/common/MysticWorld/Renderer/ItemStaffEarthRenderer.java @@ -1,47 +1,40 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelStaff; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelStaff; - import cpw.mods.fml.client.FMLClientHandler; public class ItemStaffEarthRenderer implements IItemRenderer { - private final ModelStaff model; - - public ItemStaffEarthRenderer() - { + + public ItemStaffEarthRenderer() { this.model = new ModelStaff(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, 1.2F, 0.0F, 1.0F); break; @@ -58,39 +51,10 @@ public class ItemStaffEarthRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffEarth.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - private void renderModelEquipped(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffEarth.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -103,4 +67,29 @@ public class ItemStaffEarthRenderer implements IItemRenderer { return false; } } + + private void renderModel(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffEarth.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + private void renderModelEquipped(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffEarth.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } } diff --git a/common/MysticWorld/Renderer/ItemStaffEnergyRenderer.java b/common/MysticWorld/Renderer/ItemStaffEnergyRenderer.java index 9a90493..c34cace 100644 --- a/common/MysticWorld/Renderer/ItemStaffEnergyRenderer.java +++ b/common/MysticWorld/Renderer/ItemStaffEnergyRenderer.java @@ -1,47 +1,40 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelStaff; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelStaff; - import cpw.mods.fml.client.FMLClientHandler; public class ItemStaffEnergyRenderer implements IItemRenderer { - private final ModelStaff model; - - public ItemStaffEnergyRenderer() - { + + public ItemStaffEnergyRenderer() { this.model = new ModelStaff(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, 1.2F, 0.0F, 1.0F); break; @@ -58,39 +51,10 @@ public class ItemStaffEnergyRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffEnergy.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - private void renderModelEquipped(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffEnergy.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - + @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -103,4 +67,29 @@ public class ItemStaffEnergyRenderer implements IItemRenderer { return false; } } + + private void renderModel(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffEnergy.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + private void renderModelEquipped(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffEnergy.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } } diff --git a/common/MysticWorld/Renderer/ItemStaffFireRenderer.java b/common/MysticWorld/Renderer/ItemStaffFireRenderer.java index 83d963e..92a6508 100644 --- a/common/MysticWorld/Renderer/ItemStaffFireRenderer.java +++ b/common/MysticWorld/Renderer/ItemStaffFireRenderer.java @@ -1,46 +1,40 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelStaff; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelStaff; - import cpw.mods.fml.client.FMLClientHandler; public class ItemStaffFireRenderer implements IItemRenderer { - private final ModelStaff model; - - public ItemStaffFireRenderer() - { + + public ItemStaffFireRenderer() { this.model = new ModelStaff(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, 1.2F, 0.0F, 1.0F); break; @@ -57,39 +51,10 @@ public class ItemStaffFireRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffFire.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - private void renderModelEquipped(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffFire.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -102,4 +67,29 @@ public class ItemStaffFireRenderer implements IItemRenderer { return false; } } + + private void renderModel(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffFire.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + private void renderModelEquipped(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffFire.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } } diff --git a/common/MysticWorld/Renderer/ItemStaffWaterRenderer.java b/common/MysticWorld/Renderer/ItemStaffWaterRenderer.java index 4ffe82c..5f14fe0 100644 --- a/common/MysticWorld/Renderer/ItemStaffWaterRenderer.java +++ b/common/MysticWorld/Renderer/ItemStaffWaterRenderer.java @@ -1,47 +1,40 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelStaff; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelStaff; - import cpw.mods.fml.client.FMLClientHandler; public class ItemStaffWaterRenderer implements IItemRenderer { - private final ModelStaff model; - - public ItemStaffWaterRenderer() - { + + public ItemStaffWaterRenderer() { this.model = new ModelStaff(); } - + @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { + public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; + case ENTITY: + return true; + case EQUIPPED: + return true; + case EQUIPPED_FIRST_PERSON: + return true; + case INVENTORY: + return true; + default: + return false; } } - + @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch(type) - { + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch (type) { case ENTITY: renderModel(0.0F, 1.2F, 0.0F, 1.0F); break; @@ -58,39 +51,10 @@ public class ItemStaffWaterRenderer implements IItemRenderer { break; } } - - private void renderModel(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffWater.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - private void renderModelEquipped(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(x, y, z); - GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("mysticmods:textures" + "/models/StaffWater.png")); - model.renderModel(0.0625f); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - switch(type) - { + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { case ENTITY: return true; case EQUIPPED: @@ -103,4 +67,29 @@ public class ItemStaffWaterRenderer implements IItemRenderer { return false; } } + + private void renderModel(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 0.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffWater.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + private void renderModelEquipped(float x, float y, float z, float scale) { + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glScalef(scale, scale, scale); + GL11.glTranslatef(x, y, z); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("mysticmods:textures" + "/models/StaffWater.png")); + model.renderModel(0.0625f); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } } diff --git a/common/MysticWorld/Renderer/RenderStaffPower.java b/common/MysticWorld/Renderer/RenderStaffPower.java index 0b379a8..e4d1584 100644 --- a/common/MysticWorld/Renderer/RenderStaffPower.java +++ b/common/MysticWorld/Renderer/RenderStaffPower.java @@ -1,73 +1,59 @@ -package MysticWorld.Renderer; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import MysticWorld.Items.ItemHandler$1; -import MysticWorld.Items.ItemStaffPower; +package mysticworld.renderer; +import mysticworld.items.ItemHandler$1; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.Item; -import net.minecraft.item.ItemPotion; -import net.minecraft.potion.PotionHelper; import net.minecraft.util.Icon; import net.minecraft.util.ResourceLocation; -public class RenderStaffPower extends Render { +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; +public class RenderStaffPower extends Render { private Item item; private int meta = 0; - public RenderStaffPower(int par1) - { - this.meta = par1; - } + public RenderStaffPower(int par1) { + this.meta = par1; + } - public void doRenderEntity(Entity entity, double par2, double par4, double par6, float par8, float par9) - { - GL11.glPushMatrix(); - this.func_110777_b(entity); - GL11.glTranslatef((float)par2, (float)par4, (float)par6); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - Icon icon = ItemHandler$1.staffPower.getIconFromDamage(this.meta); - Tessellator tessellator = Tessellator.instance; - float f3 = icon.getMinU(); - float f4 = icon.getMaxU(); - float f5 = icon.getMinV(); - float f6 = icon.getMaxV(); - float f7 = 1.0F; - float f8 = 0.5F; - float f9 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 1.0F, 0.0F); - tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6); - tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6); - tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5); - tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5); - tessellator.draw(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } + @Override + public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { + this.doRenderEntity(par1Entity, par2, par4, par6, par8, par9); + } - protected ResourceLocation func_110790_a(Entity par1Entity) - { - return TextureMap.field_110576_c; - } + public void doRenderEntity(Entity entity, double par2, double par4, double par6, float par8, float par9) { + GL11.glPushMatrix(); + this.bindEntityTexture(entity); + GL11.glTranslatef((float) par2, (float) par4, (float) par6); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + Icon icon = ItemHandler$1.staffPower.getIconFromDamage(this.meta); + Tessellator tessellator = Tessellator.instance; + float f3 = icon.getMinU(); + float f4 = icon.getMaxU(); + float f5 = icon.getMinV(); + float f6 = icon.getMaxV(); + float f7 = 1.0F; + float f8 = 0.5F; + float f9 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + tessellator.addVertexWithUV(0.0F - f8, 0.0F - f9, 0.0D, f3, f6); + tessellator.addVertexWithUV(f7 - f8, 0.0F - f9, 0.0D, f4, f6); + tessellator.addVertexWithUV(f7 - f8, 1.0F - f9, 0.0D, f4, f5); + tessellator.addVertexWithUV(0.0F - f8, 1.0F - f9, 0.0D, f3, f5); + tessellator.draw(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } - protected ResourceLocation func_110775_a(Entity par1Entity) - { - return this.func_110790_a(par1Entity); - } - - public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) - { - this.doRenderEntity(par1Entity, par2, par4, par6, par8, par9); - } + @Override + protected ResourceLocation getEntityTexture(Entity par1Entity) { + return TextureMap.locationItemsTexture; + } } diff --git a/common/MysticWorld/Renderer/TileEntityPillarInsertRenderer.java b/common/MysticWorld/Renderer/TileEntityPillarInsertRenderer.java index 3103a3a..b6046b6 100644 --- a/common/MysticWorld/Renderer/TileEntityPillarInsertRenderer.java +++ b/common/MysticWorld/Renderer/TileEntityPillarInsertRenderer.java @@ -1,41 +1,37 @@ -package MysticWorld.Renderer; +package mysticworld.renderer; +import mysticworld.model.ModelPillarInsert; +import mysticworld.tiles.TileEntityPillarInsert; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import MysticWorld.Model.ModelPillarInsert; -import MysticWorld.TileEntity.TileEntityPillarInsert; import cpw.mods.fml.client.FMLClientHandler; public class TileEntityPillarInsertRenderer extends TileEntitySpecialRenderer { - - private static final ResourceLocation texture = new ResourceLocation("mysticmods:textures" + "/models/PillarInsert.png"); + private static final ResourceLocation texture = new ResourceLocation("mysticmods:textures" + "/models/PillarInsert.png"); private ModelPillarInsert model; - - public TileEntityPillarInsertRenderer() - { - model = new ModelPillarInsert(); - } - public void renderAModelAt(TileEntityPillarInsert tileentity, double d, double d1, double d2, float f) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.5F, (float)d2 + 0.5F); - GL11.glRotatef(0F, 0F, 0F, 0F); - GL11.glScalef(1.0F, -1.0F, -1.0F); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(texture); - GL11.glPushMatrix(); - model.renderModel(0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) - { - renderAModelAt((TileEntityPillarInsert)tileentity, d, d1, d2, f); - } - + public TileEntityPillarInsertRenderer() { + model = new ModelPillarInsert(); + } + + public void renderAModelAt(TileEntityPillarInsert tileentity, double d, double d1, double d2, float f) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); + GL11.glRotatef(0F, 0F, 0F, 0F); + GL11.glScalef(1.0F, -1.0F, -1.0F); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture); + GL11.glPushMatrix(); + model.renderModel(0.0625F); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) { + renderAModelAt((TileEntityPillarInsert) tileentity, d, d1, d2, f); + } } diff --git a/common/MysticWorld/TileEntity/TileEntityPillarInsert.java b/common/MysticWorld/TileEntity/TileEntityPillarInsert.java deleted file mode 100644 index 11c28ab..0000000 --- a/common/MysticWorld/TileEntity/TileEntityPillarInsert.java +++ /dev/null @@ -1,36 +0,0 @@ -package MysticWorld.TileEntity; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet132TileEntityData; -import net.minecraft.tileentity.TileEntity; - -public class TileEntityPillarInsert extends TileEntity { - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbtTag = new NBTTagCompound(); - this.writeToNBT(nbtTag); - return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); - } - - @Override - public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) - { - readFromNBT(packet.customParam1); - } - - @Override - public void writeToNBT(NBTTagCompound par1) - { - super.writeToNBT(par1); - } - - @Override - public void readFromNBT(NBTTagCompound par1) - { - super.readFromNBT(par1); - } -} diff --git a/common/MysticWorld/Util/CommonProxy.java b/common/MysticWorld/Util/CommonProxy.java index a3d1aeb..85e17fa 100644 --- a/common/MysticWorld/Util/CommonProxy.java +++ b/common/MysticWorld/Util/CommonProxy.java @@ -1,39 +1,33 @@ -package MysticWorld.Util; +package mysticworld.util; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.src.ModLoader; import net.minecraft.world.World; -import MysticWorld.Client.FX.PowerAirFX; -import MysticWorld.Client.FX.LightCubeFX; public class CommonProxy { - - public void registerRenderIDs(){ - } - - public void registerRenders(){ - } - - public int addArmor(String armor){ + public int addArmor(String armor) { return 0; } - - public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age){ + + public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age) { } - - public void earthFX(World worldObj, double x, double y, double z, float scale){ + + public void earthFX(World worldObj, double x, double y, double z, float scale) { } - - public void energyFX(World worldObj, double x, double y, double z, float scale){ + + public void energyFX(World worldObj, double x, double y, double z, float scale) { } - - public void fireFX(World worldObj, double x, double y, double z, float scale){ + + public void fireFX(World worldObj, double x, double y, double z, float scale) { } - - public void waterFX(World worldObj, double x, double y, double z, float scale){ + + public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) { } - - public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale){ + + public void registerRenderIDs() { + } + + public void registerRenders() { + } + + public void waterFX(World worldObj, double x, double y, double z, float scale) { } - } diff --git a/common/MysticWorld/Util/Config.java b/common/MysticWorld/Util/Config.java index 0548ccf..6084f04 100644 --- a/common/MysticWorld/Util/Config.java +++ b/common/MysticWorld/Util/Config.java @@ -1,23 +1,18 @@ -package MysticWorld.Util; +package mysticworld.util; import java.io.File; -import MysticWorld.Lib.BlockIds; -import MysticWorld.Lib.EntityIds; -import MysticWorld.Lib.ItemIds; -import MysticWorld.Lib.Strings; -import MysticWorld.Lib.Booleans; - +import mysticworld.lib.BlockIds; +import mysticworld.lib.Booleans; +import mysticworld.lib.ItemIds; +import mysticworld.lib.Strings; import net.minecraftforge.common.Configuration; -public class Config -{ +public class Config { public static Configuration config; - public static void initialize(File file) - { + public static void initialize(File file) { config = new Configuration(file); - //Boolean Configurations Booleans.ENABLE_BUSH_GEN = config.get("World Generation", "Enable Bush Generation", true).getBoolean(Booleans.ENABLE_BUSH_GEN); Booleans.ENABLE_GLACIER_GEN = config.get("World Generation", "Enable Glacier Biome", true).getBoolean(Booleans.ENABLE_GLACIER_GEN); @@ -25,64 +20,49 @@ public class Config Booleans.ENABLE_MOUNTAIN_GEN = config.get("World Generation", "Enable Mountain Biome", true).getBoolean(Booleans.ENABLE_MOUNTAIN_GEN); Booleans.ENABLE_STEPPE_GEN = config.get("World Generation", "Enable Steppe Biome", true).getBoolean(Booleans.ENABLE_STEPPE_GEN); Booleans.ENABLE_TUNDRA_GEN = config.get("World Generation", "Enable Tundra Biome", true).getBoolean(Booleans.ENABLE_TUNDRA_GEN); - //Block Configuration BlockIds.ORE_STONE_1 = config.getBlock(Strings.IMBUED_STONE_NAME, BlockIds.ORE_STONE_1_DEFAULT).getInt(BlockIds.ORE_STONE_1); BlockIds.BUSH = config.getBlock(Strings.BUSH_NAME, BlockIds.BUSH_DEFAULT).getInt(BlockIds.BUSH_DEFAULT); - BlockIds.LIGHT_CUBE = config.getBlock(Strings.LIGHT_CUBE_NAME, BlockIds.LIGHT_CUBE_DEFAULT).getInt(BlockIds.LIGHT_CUBE_DEFAULT); - + BlockIds.LIGHT_CUBE = config.getBlock(Strings.LIGHT_CUBE_NAME, BlockIds.LIGHT_CUBE_DEFAULT).getInt(BlockIds.LIGHT_CUBE_DEFAULT); BlockIds.PLATFORM = config.getBlock(Strings.PLATFORM_NAME, BlockIds.PLATFORM_DEFAULT).getInt(BlockIds.PLATFORM_DEFAULT); BlockIds.PILLAR = config.getBlock(Strings.PILLAR_NAME, BlockIds.PILLAR_DEFAULT).getInt(BlockIds.PILLAR_DEFAULT); BlockIds.PILLAR_INSERT = config.getBlock(Strings.PILLAR_INSERT_NAME, BlockIds.PILLAR_INSERT_DEFAULT).getInt(BlockIds.PILLAR_INSERT_DEFAULT); - - //Item Configuration ItemIds.IMBUED_SHARD = config.getItem(Strings.IMBUED_SHARD_NAME, ItemIds.IMBUED_SHARD_DEFAULT).getInt(ItemIds.IMBUED_SHARD_DEFAULT); ItemIds.STAFF_PARTS = config.getItem(Strings.STAFF_NAME, ItemIds.STAFF_PARTS_DEFAULT).getInt(ItemIds.STAFF_PARTS_DEFAULT); - ItemIds.FIRE_STAFF = config.getItem(Strings.FIRE_STAFF_NAME, ItemIds.FIRE_STAFF_DEFAULT).getInt(ItemIds.FIRE_STAFF_DEFAULT); ItemIds.WATER_STAFF = config.getItem(Strings.WATER_STAFF_NAME, ItemIds.WATER_STAFF_DEFAULT).getInt(ItemIds.WATER_STAFF_DEFAULT); ItemIds.EARTH_STAFF = config.getItem(Strings.EARTH_STAFF_NAME, ItemIds.EARTH_STAFF_DEFAULT).getInt(ItemIds.EARTH_STAFF_DEFAULT); ItemIds.AIR_STAFF = config.getItem(Strings.AIR_STAFF_NAME, ItemIds.AIR_STAFF_DEFAULT).getInt(ItemIds.AIR_STAFF_DEFAULT); ItemIds.ENERGY_STAFF = config.getItem(Strings.ENERGY_STAFF_NAME, ItemIds.ENERGY_STAFF_DEFAULT).getInt(ItemIds.ENERGY_STAFF_DEFAULT); - ItemIds.STAFF_POWER = config.getItem(Strings.POWER_STAFF_NAME, ItemIds.STAFF_POWER_DEFAULT).getInt(ItemIds.STAFF_POWER_DEFAULT); - ItemIds.BUSH_FRUIT = config.getItem(Strings.BUSH_FRUIT_NAME, ItemIds.BUSH_FRUIT_DEFAULT).getInt(ItemIds.BUSH_FRUIT_DEFAULT); - ItemIds.VERDITE_HELMET = config.getItem(Strings.VERDITE_HELMET_NAME, ItemIds.VERDITE_HELMET_DEFAULT).getInt(ItemIds.VERDITE_HELMET_DEFAULT); ItemIds.VERDITE_CHESTPLATE = config.getItem(Strings.VERDITE_CHESTPLATE_NAME, ItemIds.VERDITE_CHESTPLATE_DEFAULT).getInt(ItemIds.VERDITE_CHESTPLATE_DEFAULT); ItemIds.VERDITE_LEGGINGS = config.getItem(Strings.VERDITE_LEGGINGS_NAME, ItemIds.VERDITE_LEGGINGS_DEFAULT).getInt(ItemIds.VERDITE_LEGGINGS_DEFAULT); ItemIds.VERDITE_BOOTS = config.getItem(Strings.VERDITE_BOOTS_NAME, ItemIds.VERDITE_BOOTS_DEFAULT).getInt(ItemIds.VERDITE_BOOTS_DEFAULT); - ItemIds.MITHRIL_HELMET = config.getItem(Strings.MITHRIL_HELMET_NAME, ItemIds.MITHRIL_HELMET_DEFAULT).getInt(ItemIds.MITHRIL_HELMET_DEFAULT); ItemIds.MITHRIL_CHESTPLATE = config.getItem(Strings.MITHRIL_CHESTPLATE_NAME, ItemIds.MITHRIL_CHESTPLATE_DEFAULT).getInt(ItemIds.MITHRIL_CHESTPLATE_DEFAULT); ItemIds.MITHRIL_LEGGINGS = config.getItem(Strings.MITHRIL_LEGGINGS_NAME, ItemIds.MITHRIL_LEGGINGS_DEFAULT).getInt(ItemIds.MITHRIL_LEGGINGS_DEFAULT); ItemIds.MITHRIL_BOOTS = config.getItem(Strings.MITHRIL_BOOTS_NAME, ItemIds.MITHRIL_BOOTS_DEFAULT).getInt(ItemIds.MITHRIL_BOOTS_DEFAULT); - ItemIds.ADAMANTINE_HELMET = config.getItem(Strings.ADAMANTINE_HELMET_NAME, ItemIds.ADAMANTINE_HELMET_DEFAULT).getInt(ItemIds.ADAMANTINE_HELMET_DEFAULT); ItemIds.ADAMANTINE_CHESTPLATE = config.getItem(Strings.ADAMANTINE_CHESTPLATE_NAME, ItemIds.ADAMANTINE_CHESTPLATE_DEFAULT).getInt(ItemIds.ADAMANTINE_CHESTPLATE_DEFAULT); ItemIds.ADAMANTINE_LEGGINGS = config.getItem(Strings.ADAMANTINE_LEGGINGS_NAME, ItemIds.ADAMANTINE_LEGGINGS_DEFAULT).getInt(ItemIds.ADAMANTINE_LEGGINGS_DEFAULT); ItemIds.ADAMANTINE_BOOTS = config.getItem(Strings.ADAMANTINE_BOOTS_NAME, ItemIds.ADAMANTINE_BOOTS_DEFAULT).getInt(ItemIds.ADAMANTINE_BOOTS_DEFAULT); - ItemIds.IRIDIUM_HELMET = config.getItem(Strings.IRIDIUM_HELMET_NAME, ItemIds.IRIDIUM_HELMET_DEFAULT).getInt(ItemIds.IRIDIUM_HELMET_DEFAULT); ItemIds.IRIDIUM_CHESTPLATE = config.getItem(Strings.IRIDIUM_CHESTPLATE_NAME, ItemIds.IRIDIUM_CHESTPLATE_DEFAULT).getInt(ItemIds.IRIDIUM_CHESTPLATE_DEFAULT); ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS_DEFAULT).getInt(ItemIds.IRIDIUM_LEGGINGS_DEFAULT); ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS_DEFAULT).getInt(ItemIds.IRIDIUM_BOOTS_DEFAULT); - ItemIds.FIRE_ORB = config.getItem(Strings.FIRE_ORB_NAME, ItemIds.FIRE_ORB_DEFAULT).getInt(ItemIds.FIRE_ORB_DEFAULT); ItemIds.WATER_ORB = config.getItem(Strings.WATER_ORB_NAME, ItemIds.WATER_ORB_DEFAULT).getInt(ItemIds.WATER_ORB_DEFAULT); ItemIds.EARTH_ORB = config.getItem(Strings.EARTH_ORB_NAME, ItemIds.EARTH_ORB_DEFAULT).getInt(ItemIds.EARTH_ORB_DEFAULT); ItemIds.AIR_ORB = config.getItem(Strings.AIR_ORB_NAME, ItemIds.AIR_ORB_DEFAULT).getInt(ItemIds.AIR_ORB_DEFAULT); ItemIds.ENERGY_ORB = config.getItem(Strings.ENERGY_ORB_NAME, ItemIds.ENERGY_ORB_DEFAULT).getInt(ItemIds.ENERGY_ORB_DEFAULT); - ItemIds.VOID_SHARD = config.getItem(Strings.VOID_SHARD_NAME, ItemIds.VOID_SHARD_DEFAULT).getInt(ItemIds.VOID_SHARD_DEFAULT); - config.save(); - } + } - public static void save() - { - config.save(); - } + public static void save() { + config.save(); + } } \ No newline at end of file diff --git a/common/MysticWorld/Util/Localizations.java b/common/MysticWorld/Util/Localizations.java index 970315d..dc22b20 100644 --- a/common/MysticWorld/Util/Localizations.java +++ b/common/MysticWorld/Util/Localizations.java @@ -1,4 +1,4 @@ -package MysticWorld.Util; +package mysticworld.util; import java.io.File; import java.io.IOException; @@ -10,10 +10,11 @@ import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; -import MysticWorld.MysticWorld; +import mysticworld.MysticWorld; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.LanguageRegistry; + /* * * All credits go to copygirl (or copy....boy) for this one @@ -21,17 +22,14 @@ import cpw.mods.fml.common.registry.LanguageRegistry; * repository, many thanks friend c: * */ +public class Localizations { + private Localizations() { + } -public class Localizations -{ - private Localizations(){} - - public static void Initialize() - { + public static void Initialize() { File source = Loader.instance().getReversedModObjectList().get(MysticWorld.instance).getSource(); Pattern pattern = Pattern.compile(".*(assets/" + "mysticmods/lang/(.+)\\.(.+))"); - for(String file : getResources(source, pattern)) - { + for (String file : getResources(source, pattern)) { Matcher matcher = pattern.matcher(file); matcher.find(); String resource = "/" + matcher.group(1); @@ -40,73 +38,58 @@ public class Localizations LanguageRegistry.instance().loadLocalization(resource, lang, isXML); } } - - private static Collection getResources(File file, Pattern pattern) - { + + private static Collection getResources(File file, Pattern pattern) { ArrayList retval = new ArrayList(); - if(file.isDirectory()) + if (file.isDirectory()) retval.addAll(getResourcesFromDirectory(file, pattern)); - else retval.addAll(getResourcesFromJarFile(file, pattern)); + else + retval.addAll(getResourcesFromJarFile(file, pattern)); return retval; } - - private static Collection getResourcesFromJarFile(File file, Pattern pattern) - { + + private static Collection getResourcesFromDirectory(File directory, Pattern pattern) { + ArrayList retval = new ArrayList(); + File[] FileList = directory.listFiles(); + for (File file : FileList) { + if (file.isDirectory()) { + retval.addAll(getResourcesFromDirectory(file, pattern)); + } else + try { + String fileName = file.getCanonicalPath().replace('\\', '/'); + boolean accept = pattern.matcher(fileName).matches(); + if (accept) + retval.add(fileName); + } catch (final IOException e) { + throw new Error(e); + } + } + return retval; + } + + private static Collection getResourcesFromJarFile(File file, Pattern pattern) { ArrayList retval = new ArrayList(); ZipFile Zip; - try - { + try { Zip = new ZipFile(file); - } - catch (ZipException Ex) - { + } catch (ZipException Ex) { throw new Error(Ex); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } Enumeration entries = Zip.entries(); - while (entries.hasMoreElements()) - { + while (entries.hasMoreElements()) { ZipEntry ZipE = entries.nextElement(); String FileName = ZipE.getName(); boolean accept = pattern.matcher(FileName).matches(); - if(accept) + if (accept) retval.add(FileName); } - try - { + try { Zip.close(); - } - catch(IOException Ex) - { + } catch (IOException Ex) { throw new Error(Ex); } - return retval; - } - - private static Collection getResourcesFromDirectory(File directory, Pattern pattern) - { - ArrayList retval = new ArrayList(); - File[] FileList = directory.listFiles(); - for (File file : FileList) - { - if (file.isDirectory()) - { - retval.addAll(getResourcesFromDirectory(file, pattern)); - } - else try - { - String fileName = file.getCanonicalPath().replace('\\', '/'); - boolean accept = pattern.matcher(fileName).matches(); - if (accept) retval.add(fileName); - } - catch(final IOException e) - { - throw new Error(e); - } - } return retval; } } diff --git a/common/MysticWorld/Util/RecipeHandler.java b/common/MysticWorld/Util/RecipeHandler.java index fb7ab15..12e99f8 100644 --- a/common/MysticWorld/Util/RecipeHandler.java +++ b/common/MysticWorld/Util/RecipeHandler.java @@ -1,116 +1,86 @@ -package MysticWorld.Util; +package mysticworld.util; +import mysticores.items.Items; +import mysticworld.items.ItemHandler$1; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import MysticOres.Items.Items; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Items.ItemHandler$1; import cpw.mods.fml.common.registry.GameRegistry; public class RecipeHandler { - - public static void init(){ + public static void init() { itemRecipes(); itemSmelting(); } - private static void itemRecipes(){ + private static void bootsRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "# #", "# #", '#', input }); + } + private static void chestplateRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "# #", "###", "###", '#', input }); + } + + private static void helmetRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "###", "# #", '#', input }); + } + + private static void itemRecipes() { //Staff Hilt Recipe - GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 1), new Object[] { - " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.diamond - }); - + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 1), new Object[] { " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.diamond }); //Staff Handle Recipe - GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 2), new Object[] { - "#", "$", "S", '#', Item.goldNugget, '$', Item.stick, 'S', Item.dyePowder - }); - + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 2), new Object[] { "#", "$", "S", '#', Item.goldNugget, '$', Item.stick, 'S', Item.dyePowder }); //Staff Topper Recipe - GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 3), new Object[] { - " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.netherStar - }); - + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 3), new Object[] { " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.netherStar }); //Staff Recipe - GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 0), new Object[] { - " #", " X ", "Y ", '#', new ItemStack(ItemHandler$1.staffParts, 1, 3), 'X', new ItemStack(ItemHandler$1.staffParts, 1, 2), 'Y', new ItemStack(ItemHandler$1.staffParts, 1, 1) - }); - + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 0), new Object[] { " #", " X ", "Y ", '#', new ItemStack(ItemHandler$1.staffParts, 1, 3), 'X', + new ItemStack(ItemHandler$1.staffParts, 1, 2), 'Y', new ItemStack(ItemHandler$1.staffParts, 1, 1) }); //Orb Recipes orbRecipe(ItemHandler$1.fireOrb, new ItemStack(ItemHandler$1.imbuedShard, 1, 0)); orbRecipe(ItemHandler$1.waterOrb, new ItemStack(ItemHandler$1.imbuedShard, 1, 1)); orbRecipe(ItemHandler$1.earthOrb, new ItemStack(ItemHandler$1.imbuedShard, 1, 2)); orbRecipe(ItemHandler$1.airOrb, new ItemStack(ItemHandler$1.imbuedShard, 1, 3)); orbRecipe(ItemHandler$1.energyOrb, new ItemStack(ItemHandler$1.imbuedShard, 1, 4)); - //Staff Recipes staffRecipe(ItemHandler$1.fireStaff, new ItemStack(ItemHandler$1.fireOrb)); staffRecipe(ItemHandler$1.waterStaff, new ItemStack(ItemHandler$1.waterOrb)); staffRecipe(ItemHandler$1.earthStaff, new ItemStack(ItemHandler$1.earthOrb)); staffRecipe(ItemHandler$1.airStaff, new ItemStack(ItemHandler$1.airOrb)); staffRecipe(ItemHandler$1.energyStaff, new ItemStack(ItemHandler$1.energyOrb)); - //Verdite Armor helmetRecipe(ItemHandler$1.verditeHelmet, new ItemStack(Items.Resource, 1, 0)); chestplateRecipe(ItemHandler$1.verditeChestplate, new ItemStack(Items.Resource, 1, 0)); leggingsRecipe(ItemHandler$1.verditeLeggings, new ItemStack(Items.Resource, 1, 0)); bootsRecipe(ItemHandler$1.verditeBoots, new ItemStack(Items.Resource, 1, 0)); - //Mithril Armor helmetRecipe(ItemHandler$1.mithrilHelmet, new ItemStack(Items.Resource, 1, 1)); chestplateRecipe(ItemHandler$1.mithrilChestplate, new ItemStack(Items.Resource, 1, 1)); leggingsRecipe(ItemHandler$1.mithrilLeggings, new ItemStack(Items.Resource, 1, 1)); bootsRecipe(ItemHandler$1.mithrilBoots, new ItemStack(Items.Resource, 1, 1)); - //Adamantine Armor helmetRecipe(ItemHandler$1.adamantineHelmet, new ItemStack(Items.Resource, 1, 2)); chestplateRecipe(ItemHandler$1.adamantineChestplate, new ItemStack(Items.Resource, 1, 2)); leggingsRecipe(ItemHandler$1.adamantineLeggings, new ItemStack(Items.Resource, 1, 2)); bootsRecipe(ItemHandler$1.adamantineBoots, new ItemStack(Items.Resource, 1, 2)); - //Iridium Armor helmetRecipe(ItemHandler$1.iridiumHelmet, new ItemStack(Items.Resource, 1, 3)); chestplateRecipe(ItemHandler$1.iridiumChestplate, new ItemStack(Items.Resource, 1, 3)); leggingsRecipe(ItemHandler$1.iridiumLeggings, new ItemStack(Items.Resource, 1, 3)); bootsRecipe(ItemHandler$1.iridiumBoots, new ItemStack(Items.Resource, 1, 3)); } - - private static void itemSmelting(){ + + private static void itemSmelting() { GameRegistry.addSmelting(ItemHandler$1.imbuedShard.itemID, new ItemStack(ItemHandler$1.voidShard, 1), 0.5f); } - - private static void staffRecipe(Item output, ItemStack input){ + + private static void leggingsRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "###", "# #", "# #", '#', input }); + } + + private static void orbRecipe(Item output, ItemStack input) { + GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { "##", "##", '#', input }); + } + + private static void staffRecipe(Item output, ItemStack input) { GameRegistry.addShapelessRecipe(new ItemStack(output, 1), input, new ItemStack(ItemHandler$1.staffParts, 1, 0)); } - - private static void orbRecipe(Item output, ItemStack input){ - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "##", "##", '#', input - }); - } - - private static void helmetRecipe(Item output, ItemStack input){ - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "###", "# #", '#', input - }); - } - - private static void chestplateRecipe(Item output, ItemStack input){ - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "# #", "###", "###", '#', input - }); - } - - private static void leggingsRecipe(Item output, ItemStack input){ - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "###", "# #", "# #", '#', input - }); - } - - private static void bootsRecipe(Item output, ItemStack input){ - GameRegistry.addRecipe(new ItemStack(output, 1), new Object[] { - "# #", "# #", '#', input - }); - } - } diff --git a/common/MysticWorld/Util/Reference.java b/common/MysticWorld/Util/Reference.java index 579b8b7..c3ac372 100644 --- a/common/MysticWorld/Util/Reference.java +++ b/common/MysticWorld/Util/Reference.java @@ -1,4 +1,4 @@ -package MysticWorld.Util; +package mysticworld.util; public class Reference { diff --git a/common/MysticWorld/Util/TabMysticWorld.java b/common/MysticWorld/Util/TabMysticWorld.java index 2d437bd..6a95d1e 100644 --- a/common/MysticWorld/Util/TabMysticWorld.java +++ b/common/MysticWorld/Util/TabMysticWorld.java @@ -1,19 +1,16 @@ -package MysticWorld.Util; +package mysticworld.util; -import net.minecraft.block.Block; +import mysticworld.items.ItemHandler$1; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; -import MysticWorld.Items.ItemHandler$1; public class TabMysticWorld extends CreativeTabs { - public TabMysticWorld(int par1, String par2Str) { super(par1, par2Str); } @Override public ItemStack getIconItemStack() { - return new ItemStack(ItemHandler$1.earthStaff, 1); + return new ItemStack(ItemHandler$1.earthStaff, 1); } - } \ No newline at end of file diff --git a/common/MysticWorld/Util/TickHandler.java b/common/MysticWorld/Util/TickHandler.java index c7f8234..a0810b3 100644 --- a/common/MysticWorld/Util/TickHandler.java +++ b/common/MysticWorld/Util/TickHandler.java @@ -1,129 +1,113 @@ -package MysticWorld.Util; +package mysticworld.util; import java.util.EnumSet; -import java.util.List; import java.util.Random; -import MysticWorld.Blocks.BlockBush; -import MysticWorld.Blocks.BlockHandler; -import MysticWorld.Blocks.BlockPlatform; -import MysticWorld.Items.ItemHandler$1; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; +import mysticworld.blocks.BlockHandler; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; import cpw.mods.fml.common.IScheduledTickHandler; import cpw.mods.fml.common.TickType; -public class TickHandler implements IScheduledTickHandler -{ +public class TickHandler implements IScheduledTickHandler { private EnumSet ticks; - public static final Enchantment[] enchantmentsPick = { Enchantment.efficiency, Enchantment.fortune, Enchantment.silkTouch, Enchantment.unbreaking }; - - public TickHandler(){ + + public TickHandler() { this.ticks = EnumSet.of(TickType.PLAYER); } - public void tickStart(EnumSet type, Object... tickData){ - Random rand = new Random(); - EntityPlayer player = (EntityPlayer)tickData[0]; - World world = player.worldObj; - InventoryPlayer inventory = player.inventory; - ItemStack itemstack = inventory.getCurrentItem(); - - pillarTick(player, world, inventory, rand); - } - - public void tickEnd(EnumSet type, Object... tickData){ - EntityPlayer player = (EntityPlayer)tickData[0]; - World world = player.worldObj; - InventoryPlayer inventory = player.inventory; - } - - public EnumSet ticks(){ - return this.ticks; - } - - public String getLabel(){ + @Override + public String getLabel() { return "mystic world tick"; } - public int nextTickSpacing(){ + @Override + public int nextTickSpacing() { return 20; } - - private static void pillarTick(EntityPlayer player, World world, InventoryPlayer inventory, Random rand) - { + + @Override + public void tickEnd(EnumSet type, Object... tickData) { + EntityPlayer player = (EntityPlayer) tickData[0]; + World world = player.worldObj; + InventoryPlayer inventory = player.inventory; + } + + @Override + public EnumSet ticks() { + return this.ticks; + } + + @Override + public void tickStart(EnumSet type, Object... tickData) { + Random rand = new Random(); + EntityPlayer player = (EntityPlayer) tickData[0]; + World world = player.worldObj; + InventoryPlayer inventory = player.inventory; + ItemStack itemstack = inventory.getCurrentItem(); + pillarTick(player, world, inventory, rand); + } + + private static void pillarTick(EntityPlayer player, World world, InventoryPlayer inventory, Random rand) { ItemStack itemStack = inventory.getCurrentItem(); - - int blockX = (int)player.posX - 1; - int blockY = (int)(player.posY - 0.15D); - int blockZ = (int)player.posZ - 1; - + int blockX = (int) player.posX - 1; + int blockY = (int) (player.posY - 0.15D); + int blockZ = (int) player.posZ - 1; int blockId = world.getBlockId(blockX, blockY, blockZ); int blockMeta = world.getBlockMetadata(blockX, blockY, blockZ); - - if (blockId == BlockHandler.pillarPlatform.blockID) - { - switch (blockMeta) - { - //food - case 0: - int foodLevel = player.getFoodStats().getFoodLevel(); - player.getFoodStats().setFoodLevel((int)((double)foodLevel + 0.5D)); - player.getFoodStats().setFoodSaturationLevel(20); - break; - //regeneration - case 1: - player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 6000, 4)); - break; - //speed - case 2: - player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 6000, 4)); - break; - //haste - case 3: - player.addPotionEffect(new PotionEffect(Potion.digSpeed.getId(), 6000, 4)); - break; - //resistance - case 4: - player.addPotionEffect(new PotionEffect(Potion.resistance.getId(), 6000, 4)); - break; - //jump boost - case 5: - player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 6000, 4)); - break; - //fire - case 6: - player.addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 6000, 4)); - break; - //enchanter - case 7: - if (itemStack != null && (itemStack.itemID == Item.pickaxeWood.itemID || itemStack.itemID == Item.pickaxeStone.itemID || - itemStack.itemID == Item.pickaxeIron.itemID || itemStack.itemID == Item.pickaxeGold.itemID || itemStack.itemID == Item.pickaxeDiamond.itemID)) - { - if (itemStack.isItemEnchanted() != true && player.experienceLevel >= 10) - { - player.experienceLevel -= 10; - itemStack.addEnchantment(enchantmentsPick[rand.nextInt(3)], rand.nextInt(4) + 1); - } - } - break; - default: - break; - } - } + if (blockId == BlockHandler.pillarPlatform.blockID) { + switch (blockMeta) { + //food + case 0: + int foodLevel = player.getFoodStats().getFoodLevel(); + player.getFoodStats().setFoodLevel((int) (foodLevel + 0.5D)); + player.getFoodStats().setFoodSaturationLevel(20); + break; + //regeneration + case 1: + player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 6000, 4)); + break; + //speed + case 2: + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 6000, 4)); + break; + //haste + case 3: + player.addPotionEffect(new PotionEffect(Potion.digSpeed.getId(), 6000, 4)); + break; + //resistance + case 4: + player.addPotionEffect(new PotionEffect(Potion.resistance.getId(), 6000, 4)); + break; + //jump boost + case 5: + player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 6000, 4)); + break; + //fire + case 6: + player.addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 6000, 4)); + break; + //enchanter + case 7: + if (itemStack != null + && (itemStack.itemID == Item.pickaxeWood.itemID || itemStack.itemID == Item.pickaxeStone.itemID || itemStack.itemID == Item.pickaxeIron.itemID + || itemStack.itemID == Item.pickaxeGold.itemID || itemStack.itemID == Item.pickaxeDiamond.itemID)) { + if (itemStack.isItemEnchanted() != true && player.experienceLevel >= 10) { + player.experienceLevel -= 10; + itemStack.addEnchantment(enchantmentsPick[rand.nextInt(3)], rand.nextInt(4) + 1); + } + } + break; + default: + break; + } + } } } \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/BushesGen.java b/common/MysticWorld/WorldGen/BushesGen.java index 6eb8427..baecf4a 100644 --- a/common/MysticWorld/WorldGen/BushesGen.java +++ b/common/MysticWorld/WorldGen/BushesGen.java @@ -1,30 +1,24 @@ -package MysticWorld.WorldGen; +package mysticworld.worldgen; import java.util.Random; -import MysticWorld.Blocks.BlockHandler; +import mysticworld.blocks.BlockHandler; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; -public class BushesGen extends WorldGenerator -{ - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - int bushType = par2Random.nextInt(12); - - for (int l = 0; l < 20; ++l) - { - int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); - int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); - int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); - - if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.bush.canPlaceBlockAt(par1World, i1, j1, k1)) - { - par1World.setBlock(i1, j1, k1, BlockHandler.bush.blockID, bushType, 2); - } - } - - return true; - } +public class BushesGen extends WorldGenerator { + @Override + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { + int bushType = par2Random.nextInt(12); + for (int l = 0; l < 20; ++l) { + int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); + int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); + int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); + if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.bush.canPlaceBlockAt(par1World, i1, j1, k1)) { + par1World.setBlock(i1, j1, k1, BlockHandler.bush.blockID, bushType, 2); + } + } + return true; + } } diff --git a/common/MysticWorld/WorldGen/StonesGen.java b/common/MysticWorld/WorldGen/StonesGen.java index 5af5a6e..5a31bff 100644 --- a/common/MysticWorld/WorldGen/StonesGen.java +++ b/common/MysticWorld/WorldGen/StonesGen.java @@ -1,28 +1,23 @@ -package MysticWorld.WorldGen; +package mysticworld.worldgen; import java.util.Random; -import MysticWorld.Blocks.BlockHandler; +import mysticworld.blocks.BlockHandler; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; -public class StonesGen extends WorldGenerator -{ - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - for (int l = 0; l < 1; ++l) - { - int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); - int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); - int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); - - if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.oreImbuedStone.canPlaceBlockAt(par1World, i1, j1, k1)) - { - par1World.setBlock(i1, j1, k1, BlockHandler.oreImbuedStone.blockID, par2Random.nextInt(5), 2); - } - } - - return true; - } +public class StonesGen extends WorldGenerator { + @Override + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { + for (int l = 0; l < 1; ++l) { + int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); + int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); + int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); + if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.oreImbuedStone.canPlaceBlockAt(par1World, i1, j1, k1)) { + par1World.setBlock(i1, j1, k1, BlockHandler.oreImbuedStone.blockID, par2Random.nextInt(5), 2); + } + } + return true; + } } diff --git a/common/MysticWorld/WorldGen/WorldGenBushes.java b/common/MysticWorld/WorldGen/WorldGenBushes.java index 7e67e30..0efc49a 100644 --- a/common/MysticWorld/WorldGen/WorldGenBushes.java +++ b/common/MysticWorld/WorldGen/WorldGenBushes.java @@ -1,4 +1,4 @@ -package MysticWorld.WorldGen; +package mysticworld.worldgen; import java.util.Random; diff --git a/common/MysticWorld/WorldGen/WorldGenHandler$1.java b/common/MysticWorld/WorldGen/WorldGenHandler$1.java index 7402e4b..63d8eb4 100644 --- a/common/MysticWorld/WorldGen/WorldGenHandler$1.java +++ b/common/MysticWorld/WorldGen/WorldGenHandler$1.java @@ -1,16 +1,12 @@ -package MysticWorld.WorldGen; +package mysticworld.worldgen; -import MysticWorld.Lib.Booleans; +import mysticworld.lib.Booleans; import cpw.mods.fml.common.registry.GameRegistry; public class WorldGenHandler$1 { - - public static void init() - { - if(Booleans.ENABLE_BUSH_GEN) + public static void init() { + if (Booleans.ENABLE_BUSH_GEN) GameRegistry.registerWorldGenerator(new WorldGenBushes()); - GameRegistry.registerWorldGenerator(new WorldGenStones()); } - } diff --git a/common/MysticWorld/WorldGen/WorldGenStones.java b/common/MysticWorld/WorldGen/WorldGenStones.java index 96a01c2..bb47529 100644 --- a/common/MysticWorld/WorldGen/WorldGenStones.java +++ b/common/MysticWorld/WorldGen/WorldGenStones.java @@ -1,4 +1,4 @@ -package MysticWorld.WorldGen; +package mysticworld.worldgen; import java.util.Random; diff --git a/resources/assets/mysticmods/lang/de_DE.xml b/common/assets/mysticmods/lang/de_DE.xml similarity index 100% rename from resources/assets/mysticmods/lang/de_DE.xml rename to common/assets/mysticmods/lang/de_DE.xml diff --git a/resources/assets/mysticmods/lang/en_US.xml b/common/assets/mysticmods/lang/en_US.xml similarity index 100% rename from resources/assets/mysticmods/lang/en_US.xml rename to common/assets/mysticmods/lang/en_US.xml diff --git a/resources/assets/mysticmods/textures/blocks/Adamantine Bricks.png b/common/assets/mysticmods/textures/blocks/Adamantine Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Adamantine Bricks.png rename to common/assets/mysticmods/textures/blocks/Adamantine Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Adamantine Ore.png b/common/assets/mysticmods/textures/blocks/Adamantine Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Adamantine Ore.png rename to common/assets/mysticmods/textures/blocks/Adamantine Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Agate Bricks.png b/common/assets/mysticmods/textures/blocks/Agate Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Agate Bricks.png rename to common/assets/mysticmods/textures/blocks/Agate Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Agate Ore.png b/common/assets/mysticmods/textures/blocks/Agate Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Agate Ore.png rename to common/assets/mysticmods/textures/blocks/Agate Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Air Imbued Stone.png b/common/assets/mysticmods/textures/blocks/Air Imbued Stone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Air Imbued Stone.png rename to common/assets/mysticmods/textures/blocks/Air Imbued Stone.png diff --git a/resources/assets/mysticmods/textures/blocks/Air Imbued Stone.png.mcmeta b/common/assets/mysticmods/textures/blocks/Air Imbued Stone.png.mcmeta similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Air Imbued Stone.png.mcmeta rename to common/assets/mysticmods/textures/blocks/Air Imbued Stone.png.mcmeta diff --git a/resources/assets/mysticmods/textures/blocks/Amethyst Bricks.png b/common/assets/mysticmods/textures/blocks/Amethyst Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Amethyst Bricks.png rename to common/assets/mysticmods/textures/blocks/Amethyst Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Amethyst Ore.png b/common/assets/mysticmods/textures/blocks/Amethyst Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Amethyst Ore.png rename to common/assets/mysticmods/textures/blocks/Amethyst Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Anorthosite Bricks.png b/common/assets/mysticmods/textures/blocks/Anorthosite Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Anorthosite Bricks.png rename to common/assets/mysticmods/textures/blocks/Anorthosite Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Anorthosite.png b/common/assets/mysticmods/textures/blocks/Anorthosite.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Anorthosite.png rename to common/assets/mysticmods/textures/blocks/Anorthosite.png diff --git a/resources/assets/mysticmods/textures/blocks/Black Planks.png b/common/assets/mysticmods/textures/blocks/Black Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Black Planks.png rename to common/assets/mysticmods/textures/blocks/Black Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Black Soulstone.png b/common/assets/mysticmods/textures/blocks/Black Soulstone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Black Soulstone.png rename to common/assets/mysticmods/textures/blocks/Black Soulstone.png diff --git a/resources/assets/mysticmods/textures/blocks/Bloodstone.png b/common/assets/mysticmods/textures/blocks/Bloodstone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Bloodstone.png rename to common/assets/mysticmods/textures/blocks/Bloodstone.png diff --git a/resources/assets/mysticmods/textures/blocks/Blue Planks.png b/common/assets/mysticmods/textures/blocks/Blue Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Blue Planks.png rename to common/assets/mysticmods/textures/blocks/Blue Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Blue Soulstone.png b/common/assets/mysticmods/textures/blocks/Blue Soulstone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Blue Soulstone.png rename to common/assets/mysticmods/textures/blocks/Blue Soulstone.png diff --git a/resources/assets/mysticmods/textures/blocks/Bush.png b/common/assets/mysticmods/textures/blocks/Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Bush.png rename to common/assets/mysticmods/textures/blocks/Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Earth Imbued Stone.png b/common/assets/mysticmods/textures/blocks/Earth Imbued Stone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Earth Imbued Stone.png rename to common/assets/mysticmods/textures/blocks/Earth Imbued Stone.png diff --git a/resources/assets/mysticmods/textures/blocks/Earth Imbued Stone.png.mcmeta b/common/assets/mysticmods/textures/blocks/Earth Imbued Stone.png.mcmeta similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Earth Imbued Stone.png.mcmeta rename to common/assets/mysticmods/textures/blocks/Earth Imbued Stone.png.mcmeta diff --git a/resources/assets/mysticmods/textures/blocks/Energy Imbued Stone.png b/common/assets/mysticmods/textures/blocks/Energy Imbued Stone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Energy Imbued Stone.png rename to common/assets/mysticmods/textures/blocks/Energy Imbued Stone.png diff --git a/resources/assets/mysticmods/textures/blocks/Energy Imbued Stone.png.mcmeta b/common/assets/mysticmods/textures/blocks/Energy Imbued Stone.png.mcmeta similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Energy Imbued Stone.png.mcmeta rename to common/assets/mysticmods/textures/blocks/Energy Imbued Stone.png.mcmeta diff --git a/resources/assets/mysticmods/textures/blocks/Fire Imbued Stone.png b/common/assets/mysticmods/textures/blocks/Fire Imbued Stone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Fire Imbued Stone.png rename to common/assets/mysticmods/textures/blocks/Fire Imbued Stone.png diff --git a/resources/assets/mysticmods/textures/blocks/Fire Imbued Stone.png.mcmeta b/common/assets/mysticmods/textures/blocks/Fire Imbued Stone.png.mcmeta similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Fire Imbued Stone.png.mcmeta rename to common/assets/mysticmods/textures/blocks/Fire Imbued Stone.png.mcmeta diff --git a/resources/assets/mysticmods/textures/blocks/Fire Resistance Bush.png b/common/assets/mysticmods/textures/blocks/Fire Resistance Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Fire Resistance Bush.png rename to common/assets/mysticmods/textures/blocks/Fire Resistance Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Green Planks.png b/common/assets/mysticmods/textures/blocks/Green Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Green Planks.png rename to common/assets/mysticmods/textures/blocks/Green Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Harming Bush.png b/common/assets/mysticmods/textures/blocks/Harming Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Harming Bush.png rename to common/assets/mysticmods/textures/blocks/Harming Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Health Bush.png b/common/assets/mysticmods/textures/blocks/Health Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Health Bush.png rename to common/assets/mysticmods/textures/blocks/Health Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Invisibility Bush.png b/common/assets/mysticmods/textures/blocks/Invisibility Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Invisibility Bush.png rename to common/assets/mysticmods/textures/blocks/Invisibility Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Iridium Bricks.png b/common/assets/mysticmods/textures/blocks/Iridium Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Iridium Bricks.png rename to common/assets/mysticmods/textures/blocks/Iridium Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Iridium Ore.png b/common/assets/mysticmods/textures/blocks/Iridium Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Iridium Ore.png rename to common/assets/mysticmods/textures/blocks/Iridium Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Limestone Bricks.png b/common/assets/mysticmods/textures/blocks/Limestone Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Limestone Bricks.png rename to common/assets/mysticmods/textures/blocks/Limestone Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Limestone.png b/common/assets/mysticmods/textures/blocks/Limestone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Limestone.png rename to common/assets/mysticmods/textures/blocks/Limestone.png diff --git a/resources/assets/mysticmods/textures/blocks/Marble Bricks.png b/common/assets/mysticmods/textures/blocks/Marble Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Marble Bricks.png rename to common/assets/mysticmods/textures/blocks/Marble Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Marble.png b/common/assets/mysticmods/textures/blocks/Marble.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Marble.png rename to common/assets/mysticmods/textures/blocks/Marble.png diff --git a/resources/assets/mysticmods/textures/blocks/Migmatite Bricks.png b/common/assets/mysticmods/textures/blocks/Migmatite Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Migmatite Bricks.png rename to common/assets/mysticmods/textures/blocks/Migmatite Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Migmatite.png b/common/assets/mysticmods/textures/blocks/Migmatite.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Migmatite.png rename to common/assets/mysticmods/textures/blocks/Migmatite.png diff --git a/resources/assets/mysticmods/textures/blocks/Mithril Bricks.png b/common/assets/mysticmods/textures/blocks/Mithril Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Mithril Bricks.png rename to common/assets/mysticmods/textures/blocks/Mithril Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Mithril Ore.png b/common/assets/mysticmods/textures/blocks/Mithril Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Mithril Ore.png rename to common/assets/mysticmods/textures/blocks/Mithril Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/MysticDirt.png b/common/assets/mysticmods/textures/blocks/MysticDirt.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/MysticDirt.png rename to common/assets/mysticmods/textures/blocks/MysticDirt.png diff --git a/resources/assets/mysticmods/textures/blocks/MysticGrass__side_snowed.png b/common/assets/mysticmods/textures/blocks/MysticGrass__side_snowed.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/MysticGrass__side_snowed.png rename to common/assets/mysticmods/textures/blocks/MysticGrass__side_snowed.png diff --git a/resources/assets/mysticmods/textures/blocks/MysticGrass__top.png b/common/assets/mysticmods/textures/blocks/MysticGrass__top.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/MysticGrass__top.png rename to common/assets/mysticmods/textures/blocks/MysticGrass__top.png diff --git a/resources/assets/mysticmods/textures/blocks/MysticGrass_side.png b/common/assets/mysticmods/textures/blocks/MysticGrass_side.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/MysticGrass_side.png rename to common/assets/mysticmods/textures/blocks/MysticGrass_side.png diff --git a/resources/assets/mysticmods/textures/blocks/MysticGrass_side_overlay.png b/common/assets/mysticmods/textures/blocks/MysticGrass_side_overlay.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/MysticGrass_side_overlay.png rename to common/assets/mysticmods/textures/blocks/MysticGrass_side_overlay.png diff --git a/resources/assets/mysticmods/textures/blocks/Night Vision Bush.png b/common/assets/mysticmods/textures/blocks/Night Vision Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Night Vision Bush.png rename to common/assets/mysticmods/textures/blocks/Night Vision Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Orange Planks.png b/common/assets/mysticmods/textures/blocks/Orange Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Orange Planks.png rename to common/assets/mysticmods/textures/blocks/Orange Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Orthogneiss Bricks.png b/common/assets/mysticmods/textures/blocks/Orthogneiss Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Orthogneiss Bricks.png rename to common/assets/mysticmods/textures/blocks/Orthogneiss Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Orthogneiss.png b/common/assets/mysticmods/textures/blocks/Orthogneiss.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Orthogneiss.png rename to common/assets/mysticmods/textures/blocks/Orthogneiss.png diff --git a/resources/assets/mysticmods/textures/blocks/Pillar.png b/common/assets/mysticmods/textures/blocks/Pillar.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Pillar.png rename to common/assets/mysticmods/textures/blocks/Pillar.png diff --git a/resources/assets/mysticmods/textures/blocks/Platform.png b/common/assets/mysticmods/textures/blocks/Platform.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Platform.png rename to common/assets/mysticmods/textures/blocks/Platform.png diff --git a/resources/assets/mysticmods/textures/blocks/Poisonous Bush.png b/common/assets/mysticmods/textures/blocks/Poisonous Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Poisonous Bush.png rename to common/assets/mysticmods/textures/blocks/Poisonous Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Purple Planks.png b/common/assets/mysticmods/textures/blocks/Purple Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Purple Planks.png rename to common/assets/mysticmods/textures/blocks/Purple Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Red Planks.png b/common/assets/mysticmods/textures/blocks/Red Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Red Planks.png rename to common/assets/mysticmods/textures/blocks/Red Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/Red Soulstone.png b/common/assets/mysticmods/textures/blocks/Red Soulstone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Red Soulstone.png rename to common/assets/mysticmods/textures/blocks/Red Soulstone.png diff --git a/resources/assets/mysticmods/textures/blocks/Regen Bush.png b/common/assets/mysticmods/textures/blocks/Regen Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Regen Bush.png rename to common/assets/mysticmods/textures/blocks/Regen Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Slate Bricks.png b/common/assets/mysticmods/textures/blocks/Slate Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Slate Bricks.png rename to common/assets/mysticmods/textures/blocks/Slate Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Slate.png b/common/assets/mysticmods/textures/blocks/Slate.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Slate.png rename to common/assets/mysticmods/textures/blocks/Slate.png diff --git a/resources/assets/mysticmods/textures/blocks/Slowness Bush.png b/common/assets/mysticmods/textures/blocks/Slowness Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Slowness Bush.png rename to common/assets/mysticmods/textures/blocks/Slowness Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Anorthosite.png b/common/assets/mysticmods/textures/blocks/Smooth Anorthosite.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Anorthosite.png rename to common/assets/mysticmods/textures/blocks/Smooth Anorthosite.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Limestone.png b/common/assets/mysticmods/textures/blocks/Smooth Limestone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Limestone.png rename to common/assets/mysticmods/textures/blocks/Smooth Limestone.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Marble.png b/common/assets/mysticmods/textures/blocks/Smooth Marble.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Marble.png rename to common/assets/mysticmods/textures/blocks/Smooth Marble.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Migmatite.png b/common/assets/mysticmods/textures/blocks/Smooth Migmatite.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Migmatite.png rename to common/assets/mysticmods/textures/blocks/Smooth Migmatite.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Orthogneiss.png b/common/assets/mysticmods/textures/blocks/Smooth Orthogneiss.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Orthogneiss.png rename to common/assets/mysticmods/textures/blocks/Smooth Orthogneiss.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Slate.png b/common/assets/mysticmods/textures/blocks/Smooth Slate.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Slate.png rename to common/assets/mysticmods/textures/blocks/Smooth Slate.png diff --git a/resources/assets/mysticmods/textures/blocks/Smooth Travertine.png b/common/assets/mysticmods/textures/blocks/Smooth Travertine.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Smooth Travertine.png rename to common/assets/mysticmods/textures/blocks/Smooth Travertine.png diff --git a/resources/assets/mysticmods/textures/blocks/Speed Bush.png b/common/assets/mysticmods/textures/blocks/Speed Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Speed Bush.png rename to common/assets/mysticmods/textures/blocks/Speed Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Tempered Glass.png b/common/assets/mysticmods/textures/blocks/Tempered Glass.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Tempered Glass.png rename to common/assets/mysticmods/textures/blocks/Tempered Glass.png diff --git a/resources/assets/mysticmods/textures/blocks/Topaz Bricks.png b/common/assets/mysticmods/textures/blocks/Topaz Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Topaz Bricks.png rename to common/assets/mysticmods/textures/blocks/Topaz Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Topaz Ore.png b/common/assets/mysticmods/textures/blocks/Topaz Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Topaz Ore.png rename to common/assets/mysticmods/textures/blocks/Topaz Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Tourmaline Bricks.png b/common/assets/mysticmods/textures/blocks/Tourmaline Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Tourmaline Bricks.png rename to common/assets/mysticmods/textures/blocks/Tourmaline Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Tourmaline Ore.png b/common/assets/mysticmods/textures/blocks/Tourmaline Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Tourmaline Ore.png rename to common/assets/mysticmods/textures/blocks/Tourmaline Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Travertine Bricks.png b/common/assets/mysticmods/textures/blocks/Travertine Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Travertine Bricks.png rename to common/assets/mysticmods/textures/blocks/Travertine Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Travertine.png b/common/assets/mysticmods/textures/blocks/Travertine.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Travertine.png rename to common/assets/mysticmods/textures/blocks/Travertine.png diff --git a/resources/assets/mysticmods/textures/blocks/Verdite Bricks.png b/common/assets/mysticmods/textures/blocks/Verdite Bricks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Verdite Bricks.png rename to common/assets/mysticmods/textures/blocks/Verdite Bricks.png diff --git a/resources/assets/mysticmods/textures/blocks/Verdite Ore.png b/common/assets/mysticmods/textures/blocks/Verdite Ore.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Verdite Ore.png rename to common/assets/mysticmods/textures/blocks/Verdite Ore.png diff --git a/resources/assets/mysticmods/textures/blocks/Water Imbued Stone.png b/common/assets/mysticmods/textures/blocks/Water Imbued Stone.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Water Imbued Stone.png rename to common/assets/mysticmods/textures/blocks/Water Imbued Stone.png diff --git a/resources/assets/mysticmods/textures/blocks/Water Imbued Stone.png.mcmeta b/common/assets/mysticmods/textures/blocks/Water Imbued Stone.png.mcmeta similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Water Imbued Stone.png.mcmeta rename to common/assets/mysticmods/textures/blocks/Water Imbued Stone.png.mcmeta diff --git a/resources/assets/mysticmods/textures/blocks/Weakness Bush.png b/common/assets/mysticmods/textures/blocks/Weakness Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Weakness Bush.png rename to common/assets/mysticmods/textures/blocks/Weakness Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Wither Bush.png b/common/assets/mysticmods/textures/blocks/Wither Bush.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Wither Bush.png rename to common/assets/mysticmods/textures/blocks/Wither Bush.png diff --git a/resources/assets/mysticmods/textures/blocks/Yellow Planks.png b/common/assets/mysticmods/textures/blocks/Yellow Planks.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/Yellow Planks.png rename to common/assets/mysticmods/textures/blocks/Yellow Planks.png diff --git a/resources/assets/mysticmods/textures/blocks/lightCube.png b/common/assets/mysticmods/textures/blocks/lightCube.png similarity index 100% rename from resources/assets/mysticmods/textures/blocks/lightCube.png rename to common/assets/mysticmods/textures/blocks/lightCube.png diff --git a/resources/assets/mysticmods/textures/items/Adamantine Ingot.png b/common/assets/mysticmods/textures/items/Adamantine Ingot.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Adamantine Ingot.png rename to common/assets/mysticmods/textures/items/Adamantine Ingot.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineArmor_0.png b/common/assets/mysticmods/textures/items/AdamantineArmor_0.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineArmor_0.png rename to common/assets/mysticmods/textures/items/AdamantineArmor_0.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineArmor_1.png b/common/assets/mysticmods/textures/items/AdamantineArmor_1.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineArmor_1.png rename to common/assets/mysticmods/textures/items/AdamantineArmor_1.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineArmor_2.png b/common/assets/mysticmods/textures/items/AdamantineArmor_2.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineArmor_2.png rename to common/assets/mysticmods/textures/items/AdamantineArmor_2.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineArmor_3.png b/common/assets/mysticmods/textures/items/AdamantineArmor_3.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineArmor_3.png rename to common/assets/mysticmods/textures/items/AdamantineArmor_3.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineAxe.png b/common/assets/mysticmods/textures/items/AdamantineAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineAxe.png rename to common/assets/mysticmods/textures/items/AdamantineAxe.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineHoe.png b/common/assets/mysticmods/textures/items/AdamantineHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineHoe.png rename to common/assets/mysticmods/textures/items/AdamantineHoe.png diff --git a/resources/assets/mysticmods/textures/items/AdamantinePickaxe.png b/common/assets/mysticmods/textures/items/AdamantinePickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantinePickaxe.png rename to common/assets/mysticmods/textures/items/AdamantinePickaxe.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineShovel.png b/common/assets/mysticmods/textures/items/AdamantineShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineShovel.png rename to common/assets/mysticmods/textures/items/AdamantineShovel.png diff --git a/resources/assets/mysticmods/textures/items/AdamantineSword.png b/common/assets/mysticmods/textures/items/AdamantineSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/AdamantineSword.png rename to common/assets/mysticmods/textures/items/AdamantineSword.png diff --git a/resources/assets/mysticmods/textures/items/Agate Gem.png b/common/assets/mysticmods/textures/items/Agate Gem.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Agate Gem.png rename to common/assets/mysticmods/textures/items/Agate Gem.png diff --git a/resources/assets/mysticmods/textures/items/Amethyst Gem.png b/common/assets/mysticmods/textures/items/Amethyst Gem.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Amethyst Gem.png rename to common/assets/mysticmods/textures/items/Amethyst Gem.png diff --git a/resources/assets/mysticmods/textures/items/Bloodstone Shard.png b/common/assets/mysticmods/textures/items/Bloodstone Shard.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Bloodstone Shard.png rename to common/assets/mysticmods/textures/items/Bloodstone Shard.png diff --git a/resources/assets/mysticmods/textures/items/BloodstoneAxe.png b/common/assets/mysticmods/textures/items/BloodstoneAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/BloodstoneAxe.png rename to common/assets/mysticmods/textures/items/BloodstoneAxe.png diff --git a/resources/assets/mysticmods/textures/items/BloodstoneHoe.png b/common/assets/mysticmods/textures/items/BloodstoneHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/BloodstoneHoe.png rename to common/assets/mysticmods/textures/items/BloodstoneHoe.png diff --git a/resources/assets/mysticmods/textures/items/BloodstonePickaxe.png b/common/assets/mysticmods/textures/items/BloodstonePickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/BloodstonePickaxe.png rename to common/assets/mysticmods/textures/items/BloodstonePickaxe.png diff --git a/resources/assets/mysticmods/textures/items/BloodstoneShovel.png b/common/assets/mysticmods/textures/items/BloodstoneShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/BloodstoneShovel.png rename to common/assets/mysticmods/textures/items/BloodstoneShovel.png diff --git a/resources/assets/mysticmods/textures/items/BloodstoneSword.png b/common/assets/mysticmods/textures/items/BloodstoneSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/BloodstoneSword.png rename to common/assets/mysticmods/textures/items/BloodstoneSword.png diff --git a/resources/assets/mysticmods/textures/items/ChargeAir.png b/common/assets/mysticmods/textures/items/ChargeAir.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ChargeAir.png rename to common/assets/mysticmods/textures/items/ChargeAir.png diff --git a/resources/assets/mysticmods/textures/items/ChargeEarth.png b/common/assets/mysticmods/textures/items/ChargeEarth.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ChargeEarth.png rename to common/assets/mysticmods/textures/items/ChargeEarth.png diff --git a/resources/assets/mysticmods/textures/items/ChargeEnergy.png b/common/assets/mysticmods/textures/items/ChargeEnergy.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ChargeEnergy.png rename to common/assets/mysticmods/textures/items/ChargeEnergy.png diff --git a/resources/assets/mysticmods/textures/items/ChargeFire.png b/common/assets/mysticmods/textures/items/ChargeFire.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ChargeFire.png rename to common/assets/mysticmods/textures/items/ChargeFire.png diff --git a/resources/assets/mysticmods/textures/items/ChargeWater.png b/common/assets/mysticmods/textures/items/ChargeWater.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ChargeWater.png rename to common/assets/mysticmods/textures/items/ChargeWater.png diff --git a/resources/assets/mysticmods/textures/items/FruitFireResistance.png b/common/assets/mysticmods/textures/items/FruitFireResistance.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitFireResistance.png rename to common/assets/mysticmods/textures/items/FruitFireResistance.png diff --git a/resources/assets/mysticmods/textures/items/FruitHarming.png b/common/assets/mysticmods/textures/items/FruitHarming.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitHarming.png rename to common/assets/mysticmods/textures/items/FruitHarming.png diff --git a/resources/assets/mysticmods/textures/items/FruitHealth.png b/common/assets/mysticmods/textures/items/FruitHealth.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitHealth.png rename to common/assets/mysticmods/textures/items/FruitHealth.png diff --git a/resources/assets/mysticmods/textures/items/FruitInvisibility.png b/common/assets/mysticmods/textures/items/FruitInvisibility.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitInvisibility.png rename to common/assets/mysticmods/textures/items/FruitInvisibility.png diff --git a/resources/assets/mysticmods/textures/items/FruitMundane.png b/common/assets/mysticmods/textures/items/FruitMundane.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitMundane.png rename to common/assets/mysticmods/textures/items/FruitMundane.png diff --git a/resources/assets/mysticmods/textures/items/FruitNightVision.png b/common/assets/mysticmods/textures/items/FruitNightVision.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitNightVision.png rename to common/assets/mysticmods/textures/items/FruitNightVision.png diff --git a/resources/assets/mysticmods/textures/items/FruitPoison.png b/common/assets/mysticmods/textures/items/FruitPoison.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitPoison.png rename to common/assets/mysticmods/textures/items/FruitPoison.png diff --git a/resources/assets/mysticmods/textures/items/FruitRegen.png b/common/assets/mysticmods/textures/items/FruitRegen.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitRegen.png rename to common/assets/mysticmods/textures/items/FruitRegen.png diff --git a/resources/assets/mysticmods/textures/items/FruitSlowness.png b/common/assets/mysticmods/textures/items/FruitSlowness.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitSlowness.png rename to common/assets/mysticmods/textures/items/FruitSlowness.png diff --git a/resources/assets/mysticmods/textures/items/FruitSpeed.png b/common/assets/mysticmods/textures/items/FruitSpeed.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitSpeed.png rename to common/assets/mysticmods/textures/items/FruitSpeed.png diff --git a/resources/assets/mysticmods/textures/items/FruitWeakness.png b/common/assets/mysticmods/textures/items/FruitWeakness.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitWeakness.png rename to common/assets/mysticmods/textures/items/FruitWeakness.png diff --git a/resources/assets/mysticmods/textures/items/FruitWither.png b/common/assets/mysticmods/textures/items/FruitWither.png similarity index 100% rename from resources/assets/mysticmods/textures/items/FruitWither.png rename to common/assets/mysticmods/textures/items/FruitWither.png diff --git a/resources/assets/mysticmods/textures/items/Glass Shard.png b/common/assets/mysticmods/textures/items/Glass Shard.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Glass Shard.png rename to common/assets/mysticmods/textures/items/Glass Shard.png diff --git a/resources/assets/mysticmods/textures/items/Iridium Ingot.png b/common/assets/mysticmods/textures/items/Iridium Ingot.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Iridium Ingot.png rename to common/assets/mysticmods/textures/items/Iridium Ingot.png diff --git a/resources/assets/mysticmods/textures/items/Iridium Nugget.png b/common/assets/mysticmods/textures/items/Iridium Nugget.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Iridium Nugget.png rename to common/assets/mysticmods/textures/items/Iridium Nugget.png diff --git a/resources/assets/mysticmods/textures/items/IridiumArmor_0.png b/common/assets/mysticmods/textures/items/IridiumArmor_0.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumArmor_0.png rename to common/assets/mysticmods/textures/items/IridiumArmor_0.png diff --git a/resources/assets/mysticmods/textures/items/IridiumArmor_1.png b/common/assets/mysticmods/textures/items/IridiumArmor_1.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumArmor_1.png rename to common/assets/mysticmods/textures/items/IridiumArmor_1.png diff --git a/resources/assets/mysticmods/textures/items/IridiumArmor_2.png b/common/assets/mysticmods/textures/items/IridiumArmor_2.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumArmor_2.png rename to common/assets/mysticmods/textures/items/IridiumArmor_2.png diff --git a/resources/assets/mysticmods/textures/items/IridiumArmor_3.png b/common/assets/mysticmods/textures/items/IridiumArmor_3.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumArmor_3.png rename to common/assets/mysticmods/textures/items/IridiumArmor_3.png diff --git a/resources/assets/mysticmods/textures/items/IridiumAxe.png b/common/assets/mysticmods/textures/items/IridiumAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumAxe.png rename to common/assets/mysticmods/textures/items/IridiumAxe.png diff --git a/resources/assets/mysticmods/textures/items/IridiumHoe.png b/common/assets/mysticmods/textures/items/IridiumHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumHoe.png rename to common/assets/mysticmods/textures/items/IridiumHoe.png diff --git a/resources/assets/mysticmods/textures/items/IridiumPickaxe.png b/common/assets/mysticmods/textures/items/IridiumPickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumPickaxe.png rename to common/assets/mysticmods/textures/items/IridiumPickaxe.png diff --git a/resources/assets/mysticmods/textures/items/IridiumShovel.png b/common/assets/mysticmods/textures/items/IridiumShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumShovel.png rename to common/assets/mysticmods/textures/items/IridiumShovel.png diff --git a/resources/assets/mysticmods/textures/items/IridiumSword.png b/common/assets/mysticmods/textures/items/IridiumSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/IridiumSword.png rename to common/assets/mysticmods/textures/items/IridiumSword.png diff --git a/resources/assets/mysticmods/textures/items/Mithril Ingot.png b/common/assets/mysticmods/textures/items/Mithril Ingot.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Mithril Ingot.png rename to common/assets/mysticmods/textures/items/Mithril Ingot.png diff --git a/resources/assets/mysticmods/textures/items/MithrilArmor_0.png b/common/assets/mysticmods/textures/items/MithrilArmor_0.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilArmor_0.png rename to common/assets/mysticmods/textures/items/MithrilArmor_0.png diff --git a/resources/assets/mysticmods/textures/items/MithrilArmor_1.png b/common/assets/mysticmods/textures/items/MithrilArmor_1.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilArmor_1.png rename to common/assets/mysticmods/textures/items/MithrilArmor_1.png diff --git a/resources/assets/mysticmods/textures/items/MithrilArmor_2.png b/common/assets/mysticmods/textures/items/MithrilArmor_2.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilArmor_2.png rename to common/assets/mysticmods/textures/items/MithrilArmor_2.png diff --git a/resources/assets/mysticmods/textures/items/MithrilArmor_3.png b/common/assets/mysticmods/textures/items/MithrilArmor_3.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilArmor_3.png rename to common/assets/mysticmods/textures/items/MithrilArmor_3.png diff --git a/resources/assets/mysticmods/textures/items/MithrilAxe.png b/common/assets/mysticmods/textures/items/MithrilAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilAxe.png rename to common/assets/mysticmods/textures/items/MithrilAxe.png diff --git a/resources/assets/mysticmods/textures/items/MithrilHoe.png b/common/assets/mysticmods/textures/items/MithrilHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilHoe.png rename to common/assets/mysticmods/textures/items/MithrilHoe.png diff --git a/resources/assets/mysticmods/textures/items/MithrilPickaxe.png b/common/assets/mysticmods/textures/items/MithrilPickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilPickaxe.png rename to common/assets/mysticmods/textures/items/MithrilPickaxe.png diff --git a/resources/assets/mysticmods/textures/items/MithrilShovel.png b/common/assets/mysticmods/textures/items/MithrilShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilShovel.png rename to common/assets/mysticmods/textures/items/MithrilShovel.png diff --git a/resources/assets/mysticmods/textures/items/MithrilSword.png b/common/assets/mysticmods/textures/items/MithrilSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/MithrilSword.png rename to common/assets/mysticmods/textures/items/MithrilSword.png diff --git a/resources/assets/mysticmods/textures/items/Mystic Powder.png b/common/assets/mysticmods/textures/items/Mystic Powder.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Mystic Powder.png rename to common/assets/mysticmods/textures/items/Mystic Powder.png diff --git a/resources/assets/mysticmods/textures/items/Obsidian Rod.png b/common/assets/mysticmods/textures/items/Obsidian Rod.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Obsidian Rod.png rename to common/assets/mysticmods/textures/items/Obsidian Rod.png diff --git a/resources/assets/mysticmods/textures/items/Obsidian Shard.png b/common/assets/mysticmods/textures/items/Obsidian Shard.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Obsidian Shard.png rename to common/assets/mysticmods/textures/items/Obsidian Shard.png diff --git a/resources/assets/mysticmods/textures/items/ObsidianAxe.png b/common/assets/mysticmods/textures/items/ObsidianAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ObsidianAxe.png rename to common/assets/mysticmods/textures/items/ObsidianAxe.png diff --git a/resources/assets/mysticmods/textures/items/ObsidianHoe.png b/common/assets/mysticmods/textures/items/ObsidianHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ObsidianHoe.png rename to common/assets/mysticmods/textures/items/ObsidianHoe.png diff --git a/resources/assets/mysticmods/textures/items/ObsidianPickaxe.png b/common/assets/mysticmods/textures/items/ObsidianPickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ObsidianPickaxe.png rename to common/assets/mysticmods/textures/items/ObsidianPickaxe.png diff --git a/resources/assets/mysticmods/textures/items/ObsidianShovel.png b/common/assets/mysticmods/textures/items/ObsidianShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ObsidianShovel.png rename to common/assets/mysticmods/textures/items/ObsidianShovel.png diff --git a/resources/assets/mysticmods/textures/items/ObsidianSword.png b/common/assets/mysticmods/textures/items/ObsidianSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ObsidianSword.png rename to common/assets/mysticmods/textures/items/ObsidianSword.png diff --git a/resources/assets/mysticmods/textures/items/Satchel.png b/common/assets/mysticmods/textures/items/Satchel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Satchel.png rename to common/assets/mysticmods/textures/items/Satchel.png diff --git a/resources/assets/mysticmods/textures/items/ShardAir.png b/common/assets/mysticmods/textures/items/ShardAir.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardAir.png rename to common/assets/mysticmods/textures/items/ShardAir.png diff --git a/resources/assets/mysticmods/textures/items/ShardEarth.png b/common/assets/mysticmods/textures/items/ShardEarth.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardEarth.png rename to common/assets/mysticmods/textures/items/ShardEarth.png diff --git a/resources/assets/mysticmods/textures/items/ShardEnergy.png b/common/assets/mysticmods/textures/items/ShardEnergy.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardEnergy.png rename to common/assets/mysticmods/textures/items/ShardEnergy.png diff --git a/resources/assets/mysticmods/textures/items/ShardFire.png b/common/assets/mysticmods/textures/items/ShardFire.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardFire.png rename to common/assets/mysticmods/textures/items/ShardFire.png diff --git a/resources/assets/mysticmods/textures/items/ShardVoid.png b/common/assets/mysticmods/textures/items/ShardVoid.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardVoid.png rename to common/assets/mysticmods/textures/items/ShardVoid.png diff --git a/resources/assets/mysticmods/textures/items/ShardWater.png b/common/assets/mysticmods/textures/items/ShardWater.png similarity index 100% rename from resources/assets/mysticmods/textures/items/ShardWater.png rename to common/assets/mysticmods/textures/items/ShardWater.png diff --git a/resources/assets/mysticmods/textures/items/StaffPart_Handle.png b/common/assets/mysticmods/textures/items/StaffPart_Handle.png similarity index 100% rename from resources/assets/mysticmods/textures/items/StaffPart_Handle.png rename to common/assets/mysticmods/textures/items/StaffPart_Handle.png diff --git a/resources/assets/mysticmods/textures/items/StaffPart_Head.png b/common/assets/mysticmods/textures/items/StaffPart_Head.png similarity index 100% rename from resources/assets/mysticmods/textures/items/StaffPart_Head.png rename to common/assets/mysticmods/textures/items/StaffPart_Head.png diff --git a/resources/assets/mysticmods/textures/items/StaffPart_Hilt.png b/common/assets/mysticmods/textures/items/StaffPart_Hilt.png similarity index 100% rename from resources/assets/mysticmods/textures/items/StaffPart_Hilt.png rename to common/assets/mysticmods/textures/items/StaffPart_Hilt.png diff --git a/resources/assets/mysticmods/textures/items/StaffPart_Staff.png b/common/assets/mysticmods/textures/items/StaffPart_Staff.png similarity index 100% rename from resources/assets/mysticmods/textures/items/StaffPart_Staff.png rename to common/assets/mysticmods/textures/items/StaffPart_Staff.png diff --git a/resources/assets/mysticmods/textures/items/Topaz Gem.png b/common/assets/mysticmods/textures/items/Topaz Gem.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Topaz Gem.png rename to common/assets/mysticmods/textures/items/Topaz Gem.png diff --git a/resources/assets/mysticmods/textures/items/Tourmaline Gem.png b/common/assets/mysticmods/textures/items/Tourmaline Gem.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Tourmaline Gem.png rename to common/assets/mysticmods/textures/items/Tourmaline Gem.png diff --git a/resources/assets/mysticmods/textures/items/Verdite Ingot.png b/common/assets/mysticmods/textures/items/Verdite Ingot.png similarity index 100% rename from resources/assets/mysticmods/textures/items/Verdite Ingot.png rename to common/assets/mysticmods/textures/items/Verdite Ingot.png diff --git a/resources/assets/mysticmods/textures/items/VerditeArmor_0.png b/common/assets/mysticmods/textures/items/VerditeArmor_0.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeArmor_0.png rename to common/assets/mysticmods/textures/items/VerditeArmor_0.png diff --git a/resources/assets/mysticmods/textures/items/VerditeArmor_1.png b/common/assets/mysticmods/textures/items/VerditeArmor_1.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeArmor_1.png rename to common/assets/mysticmods/textures/items/VerditeArmor_1.png diff --git a/resources/assets/mysticmods/textures/items/VerditeArmor_2.png b/common/assets/mysticmods/textures/items/VerditeArmor_2.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeArmor_2.png rename to common/assets/mysticmods/textures/items/VerditeArmor_2.png diff --git a/resources/assets/mysticmods/textures/items/VerditeArmor_3.png b/common/assets/mysticmods/textures/items/VerditeArmor_3.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeArmor_3.png rename to common/assets/mysticmods/textures/items/VerditeArmor_3.png diff --git a/resources/assets/mysticmods/textures/items/VerditeAxe.png b/common/assets/mysticmods/textures/items/VerditeAxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeAxe.png rename to common/assets/mysticmods/textures/items/VerditeAxe.png diff --git a/resources/assets/mysticmods/textures/items/VerditeHoe.png b/common/assets/mysticmods/textures/items/VerditeHoe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeHoe.png rename to common/assets/mysticmods/textures/items/VerditeHoe.png diff --git a/resources/assets/mysticmods/textures/items/VerditePickaxe.png b/common/assets/mysticmods/textures/items/VerditePickaxe.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditePickaxe.png rename to common/assets/mysticmods/textures/items/VerditePickaxe.png diff --git a/resources/assets/mysticmods/textures/items/VerditeShovel.png b/common/assets/mysticmods/textures/items/VerditeShovel.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeShovel.png rename to common/assets/mysticmods/textures/items/VerditeShovel.png diff --git a/resources/assets/mysticmods/textures/items/VerditeSword.png b/common/assets/mysticmods/textures/items/VerditeSword.png similarity index 100% rename from resources/assets/mysticmods/textures/items/VerditeSword.png rename to common/assets/mysticmods/textures/items/VerditeSword.png diff --git a/resources/assets/mysticmods/textures/misc/airFX.png b/common/assets/mysticmods/textures/misc/airFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/airFX.png rename to common/assets/mysticmods/textures/misc/airFX.png diff --git a/resources/assets/mysticmods/textures/misc/earthFX.png b/common/assets/mysticmods/textures/misc/earthFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/earthFX.png rename to common/assets/mysticmods/textures/misc/earthFX.png diff --git a/resources/assets/mysticmods/textures/misc/energyFX.png b/common/assets/mysticmods/textures/misc/energyFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/energyFX.png rename to common/assets/mysticmods/textures/misc/energyFX.png diff --git a/resources/assets/mysticmods/textures/misc/fireFX.png b/common/assets/mysticmods/textures/misc/fireFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/fireFX.png rename to common/assets/mysticmods/textures/misc/fireFX.png diff --git a/resources/assets/mysticmods/textures/misc/lightCubeFX.png b/common/assets/mysticmods/textures/misc/lightCubeFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/lightCubeFX.png rename to common/assets/mysticmods/textures/misc/lightCubeFX.png diff --git a/resources/assets/mysticmods/textures/misc/waterFX.png b/common/assets/mysticmods/textures/misc/waterFX.png similarity index 100% rename from resources/assets/mysticmods/textures/misc/waterFX.png rename to common/assets/mysticmods/textures/misc/waterFX.png diff --git a/resources/assets/mysticmods/textures/mob/MysticVillager.png b/common/assets/mysticmods/textures/mob/MysticVillager.png similarity index 100% rename from resources/assets/mysticmods/textures/mob/MysticVillager.png rename to common/assets/mysticmods/textures/mob/MysticVillager.png diff --git a/resources/assets/mysticmods/textures/models/AirStaff.png b/common/assets/mysticmods/textures/models/AirStaff.png similarity index 100% rename from resources/assets/mysticmods/textures/models/AirStaff.png rename to common/assets/mysticmods/textures/models/AirStaff.png diff --git a/resources/assets/mysticmods/textures/models/EarthStaff.png b/common/assets/mysticmods/textures/models/EarthStaff.png similarity index 100% rename from resources/assets/mysticmods/textures/models/EarthStaff.png rename to common/assets/mysticmods/textures/models/EarthStaff.png diff --git a/resources/assets/mysticmods/textures/models/EnergyStaff.png b/common/assets/mysticmods/textures/models/EnergyStaff.png similarity index 100% rename from resources/assets/mysticmods/textures/models/EnergyStaff.png rename to common/assets/mysticmods/textures/models/EnergyStaff.png diff --git a/resources/assets/mysticmods/textures/models/FireStaff.png b/common/assets/mysticmods/textures/models/FireStaff.png similarity index 100% rename from resources/assets/mysticmods/textures/models/FireStaff.png rename to common/assets/mysticmods/textures/models/FireStaff.png diff --git a/resources/assets/mysticmods/textures/models/OrbAir.png b/common/assets/mysticmods/textures/models/OrbAir.png similarity index 100% rename from resources/assets/mysticmods/textures/models/OrbAir.png rename to common/assets/mysticmods/textures/models/OrbAir.png diff --git a/resources/assets/mysticmods/textures/models/OrbEarth.png b/common/assets/mysticmods/textures/models/OrbEarth.png similarity index 100% rename from resources/assets/mysticmods/textures/models/OrbEarth.png rename to common/assets/mysticmods/textures/models/OrbEarth.png diff --git a/resources/assets/mysticmods/textures/models/OrbEnergy.png b/common/assets/mysticmods/textures/models/OrbEnergy.png similarity index 100% rename from resources/assets/mysticmods/textures/models/OrbEnergy.png rename to common/assets/mysticmods/textures/models/OrbEnergy.png diff --git a/resources/assets/mysticmods/textures/models/OrbFire.png b/common/assets/mysticmods/textures/models/OrbFire.png similarity index 100% rename from resources/assets/mysticmods/textures/models/OrbFire.png rename to common/assets/mysticmods/textures/models/OrbFire.png diff --git a/resources/assets/mysticmods/textures/models/OrbWater.png b/common/assets/mysticmods/textures/models/OrbWater.png similarity index 100% rename from resources/assets/mysticmods/textures/models/OrbWater.png rename to common/assets/mysticmods/textures/models/OrbWater.png diff --git a/resources/assets/mysticmods/textures/models/PillarInsert.png b/common/assets/mysticmods/textures/models/PillarInsert.png similarity index 100% rename from resources/assets/mysticmods/textures/models/PillarInsert.png rename to common/assets/mysticmods/textures/models/PillarInsert.png diff --git a/resources/assets/mysticmods/textures/models/PillarInsertFilled.png b/common/assets/mysticmods/textures/models/PillarInsertFilled.png similarity index 100% rename from resources/assets/mysticmods/textures/models/PillarInsertFilled.png rename to common/assets/mysticmods/textures/models/PillarInsertFilled.png diff --git a/resources/assets/mysticmods/textures/models/StaffAir.png b/common/assets/mysticmods/textures/models/StaffAir.png similarity index 100% rename from resources/assets/mysticmods/textures/models/StaffAir.png rename to common/assets/mysticmods/textures/models/StaffAir.png diff --git a/resources/assets/mysticmods/textures/models/StaffEarth.png b/common/assets/mysticmods/textures/models/StaffEarth.png similarity index 100% rename from resources/assets/mysticmods/textures/models/StaffEarth.png rename to common/assets/mysticmods/textures/models/StaffEarth.png diff --git a/resources/assets/mysticmods/textures/models/StaffEnergy.png b/common/assets/mysticmods/textures/models/StaffEnergy.png similarity index 100% rename from resources/assets/mysticmods/textures/models/StaffEnergy.png rename to common/assets/mysticmods/textures/models/StaffEnergy.png diff --git a/resources/assets/mysticmods/textures/models/StaffFire.png b/common/assets/mysticmods/textures/models/StaffFire.png similarity index 100% rename from resources/assets/mysticmods/textures/models/StaffFire.png rename to common/assets/mysticmods/textures/models/StaffFire.png diff --git a/resources/assets/mysticmods/textures/models/StaffWater.png b/common/assets/mysticmods/textures/models/StaffWater.png similarity index 100% rename from resources/assets/mysticmods/textures/models/StaffWater.png rename to common/assets/mysticmods/textures/models/StaffWater.png diff --git a/resources/assets/mysticmods/textures/models/WaterStaff.png b/common/assets/mysticmods/textures/models/WaterStaff.png similarity index 100% rename from resources/assets/mysticmods/textures/models/WaterStaff.png rename to common/assets/mysticmods/textures/models/WaterStaff.png diff --git a/resources/assets/mysticmods/textures/models/armor/Adamantine_layer_1.png b/common/assets/mysticmods/textures/models/armor/Adamantine_layer_1.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Adamantine_layer_1.png rename to common/assets/mysticmods/textures/models/armor/Adamantine_layer_1.png diff --git a/resources/assets/mysticmods/textures/models/armor/Adamantine_layer_2.png b/common/assets/mysticmods/textures/models/armor/Adamantine_layer_2.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Adamantine_layer_2.png rename to common/assets/mysticmods/textures/models/armor/Adamantine_layer_2.png diff --git a/resources/assets/mysticmods/textures/models/armor/Iridium_layer_1.png b/common/assets/mysticmods/textures/models/armor/Iridium_layer_1.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Iridium_layer_1.png rename to common/assets/mysticmods/textures/models/armor/Iridium_layer_1.png diff --git a/resources/assets/mysticmods/textures/models/armor/Iridium_layer_2.png b/common/assets/mysticmods/textures/models/armor/Iridium_layer_2.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Iridium_layer_2.png rename to common/assets/mysticmods/textures/models/armor/Iridium_layer_2.png diff --git a/resources/assets/mysticmods/textures/models/armor/Mithril_layer_1.png b/common/assets/mysticmods/textures/models/armor/Mithril_layer_1.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Mithril_layer_1.png rename to common/assets/mysticmods/textures/models/armor/Mithril_layer_1.png diff --git a/resources/assets/mysticmods/textures/models/armor/Mithril_layer_2.png b/common/assets/mysticmods/textures/models/armor/Mithril_layer_2.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Mithril_layer_2.png rename to common/assets/mysticmods/textures/models/armor/Mithril_layer_2.png diff --git a/resources/assets/mysticmods/textures/models/armor/Verdite_layer_1.png b/common/assets/mysticmods/textures/models/armor/Verdite_layer_1.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Verdite_layer_1.png rename to common/assets/mysticmods/textures/models/armor/Verdite_layer_1.png diff --git a/resources/assets/mysticmods/textures/models/armor/Verdite_layer_2.png b/common/assets/mysticmods/textures/models/armor/Verdite_layer_2.png similarity index 100% rename from resources/assets/mysticmods/textures/models/armor/Verdite_layer_2.png rename to common/assets/mysticmods/textures/models/armor/Verdite_layer_2.png diff --git a/common/MysticWorld/TileEntity/TileEntityHandler.java b/common/mysticworld/tiles/TileEntityHandler.java similarity index 65% rename from common/MysticWorld/TileEntity/TileEntityHandler.java rename to common/mysticworld/tiles/TileEntityHandler.java index 852f168..44e712d 100644 --- a/common/MysticWorld/TileEntity/TileEntityHandler.java +++ b/common/mysticworld/tiles/TileEntityHandler.java @@ -1,13 +1,10 @@ -package MysticWorld.TileEntity; +package mysticworld.tiles; -import MysticWorld.Lib.Strings; +import mysticworld.lib.Strings; import cpw.mods.fml.common.registry.GameRegistry; public class TileEntityHandler { - - public static void init() - { + public static void init() { GameRegistry.registerTileEntity(TileEntityPillarInsert.class, Strings.PILLAR_INSERT_TE_NAME); } - } diff --git a/common/mysticworld/tiles/TileEntityPillarInsert.java b/common/mysticworld/tiles/TileEntityPillarInsert.java new file mode 100644 index 0000000..c74307f --- /dev/null +++ b/common/mysticworld/tiles/TileEntityPillarInsert.java @@ -0,0 +1,31 @@ +package mysticworld.tiles; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.INetworkManager; +import net.minecraft.network.packet.Packet; +import net.minecraft.network.packet.Packet132TileEntityData; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityPillarInsert extends TileEntity { + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbtTag = new NBTTagCompound(); + this.writeToNBT(nbtTag); + return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); + } + + @Override + public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { + readFromNBT(packet.data); + } + + @Override + public void readFromNBT(NBTTagCompound par1) { + super.readFromNBT(par1); + } + + @Override + public void writeToNBT(NBTTagCompound par1) { + super.writeToNBT(par1); + } +} diff --git a/resources/assets/mysticmods/models/orb.obj b/resources/assets/mysticmods/models/orb.obj deleted file mode 100644 index 355f618..0000000 --- a/resources/assets/mysticmods/models/orb.obj +++ /dev/null @@ -1,1962 +0,0 @@ -# Blender v2.68 (sub 0) OBJ File: '' -# www.blender.org -mtllib orb.mtl -o Sphere -v -0.195090 0.980785 0.000000 -v -0.382683 0.923880 0.000000 -v -0.555570 0.831470 0.000000 -v -0.707107 0.707107 0.000000 -v -0.831470 0.555570 0.000000 -v -0.923880 0.382683 0.000000 -v -0.980785 0.195090 0.000000 -v -1.000000 0.000000 0.000000 -v -0.980785 -0.195090 0.000000 -v -0.923880 -0.382683 0.000000 -v -0.831470 -0.555570 0.000000 -v -0.707107 -0.707107 0.000000 -v -0.555570 -0.831470 0.000000 -v -0.382683 -0.923880 0.000000 -v -0.195090 -0.980785 0.000000 -v -0.191342 0.980785 -0.038060 -v -0.375330 0.923880 -0.074658 -v -0.544895 0.831470 -0.108386 -v -0.693520 0.707107 -0.137950 -v -0.815493 0.555570 -0.162212 -v -0.906127 0.382683 -0.180240 -v -0.961940 0.195090 -0.191342 -v -0.980785 0.000000 -0.195090 -v -0.961940 -0.195090 -0.191342 -v -0.906127 -0.382683 -0.180240 -v -0.815493 -0.555570 -0.162212 -v -0.693520 -0.707107 -0.137950 -v -0.544895 -0.831470 -0.108386 -v -0.375330 -0.923880 -0.074658 -v -0.191341 -0.980785 -0.038060 -v -0.180240 0.980785 -0.074658 -v -0.353553 0.923880 -0.146447 -v -0.513280 0.831470 -0.212608 -v -0.653281 0.707107 -0.270598 -v -0.768178 0.555570 -0.318190 -v -0.853553 0.382683 -0.353553 -v -0.906127 0.195090 -0.375330 -v -0.923880 0.000000 -0.382684 -v -0.906127 -0.195090 -0.375330 -v -0.853553 -0.382683 -0.353554 -v -0.768178 -0.555570 -0.318190 -v -0.653281 -0.707107 -0.270598 -v -0.513280 -0.831470 -0.212608 -v -0.353553 -0.923880 -0.146447 -v -0.180240 -0.980785 -0.074658 -v -0.162212 0.980785 -0.108387 -v -0.318190 0.923880 -0.212608 -v -0.461940 0.831470 -0.308658 -v -0.587938 0.707107 -0.392848 -v -0.691342 0.555570 -0.461940 -v -0.768178 0.382683 -0.513280 -v -0.815493 0.195090 -0.544895 -v -0.831470 0.000000 -0.555570 -v -0.815493 -0.195090 -0.544895 -v -0.768178 -0.382683 -0.513280 -v -0.691342 -0.555570 -0.461940 -v -0.587938 -0.707107 -0.392848 -v -0.461940 -0.831470 -0.308658 -v -0.318189 -0.923880 -0.212608 -v -0.162211 -0.980785 -0.108386 -v -0.137950 0.980785 -0.137950 -v -0.270598 0.923880 -0.270598 -v -0.392847 0.831470 -0.392848 -v -0.500000 0.707107 -0.500000 -v -0.587938 0.555570 -0.587938 -v -0.653281 0.382683 -0.653282 -v -0.693520 0.195090 -0.693520 -v -0.707107 0.000000 -0.707107 -v -0.693520 -0.195090 -0.693520 -v -0.653281 -0.382683 -0.653282 -v -0.587938 -0.555570 -0.587938 -v -0.500000 -0.707107 -0.500000 -v -0.392847 -0.831470 -0.392848 -v -0.270598 -0.923880 -0.270598 -v -0.137949 -0.980785 -0.137950 -v -0.108386 0.980785 -0.162212 -v -0.212607 0.923880 -0.318190 -v -0.308658 0.831470 -0.461940 -v -0.392847 0.707107 -0.587938 -v -0.461940 0.555570 -0.691342 -v -0.513280 0.382683 -0.768178 -v -0.544895 0.195090 -0.815493 -v -0.555570 0.000000 -0.831470 -v -0.544895 -0.195090 -0.815493 -v -0.513280 -0.382683 -0.768178 -v -0.461940 -0.555570 -0.691342 -v -0.392847 -0.707107 -0.587938 -v -0.308658 -0.831470 -0.461940 -v -0.212607 -0.923880 -0.318190 -v -0.108386 -0.980785 -0.162212 -v -0.074658 0.980785 -0.180240 -v -0.146446 0.923880 -0.353554 -v -0.212607 0.831470 -0.513280 -v -0.270598 0.707107 -0.653282 -v -0.318189 0.555570 -0.768178 -v -0.353553 0.382683 -0.853554 -v -0.375330 0.195090 -0.906128 -v -0.382683 0.000000 -0.923880 -v -0.375330 -0.195090 -0.906128 -v -0.353553 -0.382683 -0.853554 -v -0.318189 -0.555570 -0.768178 -v -0.270598 -0.707107 -0.653282 -v -0.212607 -0.831470 -0.513280 -v -0.146446 -0.923880 -0.353553 -v -0.074658 -0.980785 -0.180240 -v -0.038060 0.980785 -0.191342 -v -0.074658 0.923880 -0.375331 -v -0.108386 0.831470 -0.544895 -v -0.137949 0.707107 -0.693520 -v -0.162211 0.555570 -0.815493 -v -0.180240 0.382683 -0.906128 -v -0.191341 0.195090 -0.961940 -v -0.195090 0.000000 -0.980785 -v -0.191341 -0.195090 -0.961940 -v -0.180240 -0.382683 -0.906128 -v -0.162211 -0.555570 -0.815493 -v -0.137949 -0.707107 -0.693520 -v -0.108386 -0.831470 -0.544895 -v -0.074658 -0.923880 -0.375330 -v -0.038060 -0.980785 -0.191342 -v 0.000000 0.980785 -0.195091 -v 0.000000 0.923880 -0.382684 -v 0.000000 0.831470 -0.555570 -v 0.000000 0.707107 -0.707107 -v 0.000000 0.555570 -0.831470 -v 0.000000 0.382683 -0.923880 -v 0.000000 0.195090 -0.980785 -v 0.000000 0.000000 -1.000000 -v 0.000000 -0.195090 -0.980785 -v 0.000000 -0.382683 -0.923880 -v 0.000000 -0.555570 -0.831470 -v 0.000000 -0.707107 -0.707107 -v 0.000000 -0.831470 -0.555570 -v 0.000000 -0.923880 -0.382684 -v 0.000000 -0.980785 -0.195090 -v 0.038061 0.980785 -0.191342 -v 0.074658 0.923880 -0.375330 -v 0.108387 0.831470 -0.544895 -v 0.137950 0.707107 -0.693520 -v 0.162212 0.555570 -0.815493 -v 0.180240 0.382683 -0.906128 -v 0.191342 0.195090 -0.961940 -v 0.195091 0.000000 -0.980785 -v 0.191342 -0.195090 -0.961940 -v 0.180240 -0.382683 -0.906128 -v 0.162212 -0.555570 -0.815493 -v 0.137950 -0.707107 -0.693520 -v 0.108387 -0.831470 -0.544895 -v 0.074658 -0.923880 -0.375330 -v 0.038061 -0.980785 -0.191342 -v 0.074658 0.980785 -0.180240 -v 0.146447 0.923880 -0.353554 -v 0.212608 0.831470 -0.513280 -v 0.270598 0.707107 -0.653282 -v 0.318190 0.555570 -0.768178 -v 0.353554 0.382683 -0.853553 -v 0.375331 0.195090 -0.906127 -v 0.382684 0.000000 -0.923880 -v 0.375331 -0.195090 -0.906127 -v 0.353554 -0.382683 -0.853553 -v 0.318190 -0.555570 -0.768178 -v 0.270598 -0.707107 -0.653282 -v 0.212608 -0.831470 -0.513280 -v 0.146447 -0.923880 -0.353553 -v 0.074658 -0.980785 -0.180240 -v 0.108387 0.980785 -0.162212 -v 0.212608 0.923880 -0.318190 -v 0.308659 0.831470 -0.461940 -v 0.392848 0.707107 -0.587938 -v 0.461940 0.555570 -0.691342 -v 0.513280 0.382683 -0.768178 -v 0.544895 0.195090 -0.815493 -v 0.555571 0.000000 -0.831470 -v 0.544895 -0.195090 -0.815493 -v 0.513280 -0.382683 -0.768178 -v 0.461940 -0.555570 -0.691342 -v 0.392848 -0.707107 -0.587938 -v 0.308659 -0.831470 -0.461940 -v 0.212608 -0.923880 -0.318190 -v 0.108387 -0.980785 -0.162212 -v 0.137950 0.980785 -0.137950 -v 0.270599 0.923880 -0.270598 -v 0.392848 0.831470 -0.392847 -v 0.500000 0.707107 -0.500000 -v 0.587938 0.555570 -0.587938 -v 0.653282 0.382683 -0.653281 -v 0.693520 0.195090 -0.693520 -v 0.707107 0.000000 -0.707107 -v 0.693520 -0.195090 -0.693520 -v 0.653282 -0.382683 -0.653281 -v 0.587938 -0.555570 -0.587938 -v 0.500000 -0.707107 -0.500000 -v 0.392848 -0.831470 -0.392847 -v 0.270598 -0.923880 -0.270598 -v 0.137950 -0.980785 -0.137950 -v 0.162212 0.980785 -0.108387 -v 0.318190 0.923880 -0.212608 -v 0.461940 0.831470 -0.308658 -v 0.587938 0.707107 -0.392847 -v 0.691342 0.555570 -0.461940 -v 0.768178 0.382683 -0.513280 -v 0.815493 0.195090 -0.544895 -v 0.831470 0.000000 -0.555570 -v 0.815493 -0.195090 -0.544895 -v 0.768178 -0.382683 -0.513280 -v 0.691342 -0.555570 -0.461940 -v 0.587938 -0.707107 -0.392847 -v 0.461940 -0.831470 -0.308658 -v 0.318190 -0.923880 -0.212608 -v 0.162212 -0.980785 -0.108386 -v 0.180241 0.980785 -0.074658 -v 0.353554 0.923880 -0.146447 -v 0.513280 0.831470 -0.212607 -v 0.653282 0.707107 -0.270598 -v 0.768178 0.555570 -0.318190 -v 0.853554 0.382683 -0.353553 -v 0.906128 0.195090 -0.375330 -v 0.923880 0.000000 -0.382683 -v 0.906128 -0.195090 -0.375330 -v 0.853554 -0.382683 -0.353553 -v 0.768178 -0.555570 -0.318190 -v 0.653282 -0.707107 -0.270598 -v 0.513280 -0.831470 -0.212607 -v 0.353554 -0.923880 -0.146447 -v 0.180240 -0.980785 -0.074658 -v 0.191342 0.980785 -0.038060 -v 0.375331 0.923880 -0.074658 -v 0.544895 0.831470 -0.108386 -v 0.693520 0.707107 -0.137950 -v 0.815493 0.555570 -0.162212 -v 0.906128 0.382683 -0.180240 -v 0.961940 0.195090 -0.191342 -v 0.980785 0.000000 -0.195090 -v 0.961940 -0.195090 -0.191342 -v 0.906128 -0.382683 -0.180240 -v 0.815493 -0.555570 -0.162212 -v 0.693520 -0.707107 -0.137950 -v 0.544895 -0.831470 -0.108386 -v 0.375331 -0.923880 -0.074658 -v 0.191342 -0.980785 -0.038060 -v 0.195091 0.980785 0.000000 -v 0.382684 0.923880 0.000000 -v 0.555570 0.831470 0.000000 -v 0.707107 0.707107 0.000000 -v 0.831470 0.555570 0.000000 -v 0.923880 0.382683 0.000000 -v 0.980785 0.195090 0.000000 -v 1.000000 0.000000 0.000000 -v 0.980785 -0.195090 0.000000 -v 0.923880 -0.382683 0.000000 -v 0.831470 -0.555570 0.000000 -v 0.707107 -0.707107 0.000000 -v 0.555570 -0.831470 0.000000 -v 0.382684 -0.923880 0.000000 -v 0.195091 -0.980785 0.000000 -v 0.191342 0.980785 0.038060 -v 0.375331 0.923880 0.074658 -v 0.544895 0.831470 0.108386 -v 0.693520 0.707107 0.137950 -v 0.815493 0.555570 0.162212 -v 0.906128 0.382683 0.180240 -v 0.961940 0.195090 0.191342 -v 0.980785 0.000000 0.195090 -v 0.961940 -0.195090 0.191342 -v 0.906128 -0.382683 0.180240 -v 0.815493 -0.555570 0.162212 -v 0.693520 -0.707107 0.137950 -v 0.544895 -0.831470 0.108386 -v 0.375331 -0.923880 0.074658 -v 0.191342 -0.980785 0.038060 -v 0.180240 0.980785 0.074658 -v 0.353554 0.923880 0.146447 -v 0.513280 0.831470 0.212608 -v 0.653282 0.707107 0.270598 -v 0.768178 0.555570 0.318190 -v 0.853554 0.382683 0.353553 -v 0.906127 0.195090 0.375330 -v 0.923880 0.000000 0.382684 -v 0.906128 -0.195090 0.375330 -v 0.853553 -0.382683 0.353553 -v 0.768178 -0.555570 0.318190 -v 0.653282 -0.707107 0.270598 -v 0.513280 -0.831470 0.212608 -v 0.353554 -0.923880 0.146447 -v 0.180240 -0.980785 0.074658 -v 0.162212 0.980785 0.108387 -v 0.318190 0.923880 0.212608 -v 0.461940 0.831470 0.308658 -v 0.587938 0.707107 0.392847 -v 0.691342 0.555570 0.461940 -v 0.768178 0.382683 0.513280 -v 0.815493 0.195090 0.544895 -v 0.831470 0.000000 0.555570 -v 0.815493 -0.195090 0.544895 -v 0.768178 -0.382683 0.513280 -v 0.691342 -0.555570 0.461940 -v 0.587938 -0.707107 0.392847 -v 0.461940 -0.831470 0.308658 -v 0.318190 -0.923880 0.212608 -v 0.162212 -0.980785 0.108386 -v 0.137950 0.980785 0.137950 -v 0.270598 0.923880 0.270598 -v 0.392848 0.831470 0.392847 -v 0.500000 0.707107 0.500000 -v 0.587938 0.555570 0.587938 -v 0.653282 0.382683 0.653281 -v 0.693520 0.195090 0.693520 -v 0.707107 0.000000 0.707107 -v 0.693520 -0.195090 0.693520 -v 0.653282 -0.382683 0.653281 -v 0.587938 -0.555570 0.587938 -v 0.500000 -0.707107 0.500000 -v 0.392848 -0.831470 0.392847 -v 0.270598 -0.923880 0.270598 -v 0.137950 -0.980785 0.137950 -v 0.108387 0.980785 0.162212 -v 0.212608 0.923880 0.318190 -v 0.308658 0.831470 0.461940 -v 0.392848 0.707107 0.587938 -v 0.461940 0.555570 0.691342 -v 0.513280 0.382683 0.768178 -v 0.544895 0.195090 0.815493 -v 0.555570 0.000000 0.831470 -v 0.544895 -0.195090 0.815493 -v 0.513280 -0.382683 0.768178 -v 0.461940 -0.555570 0.691342 -v 0.392848 -0.707107 0.587938 -v 0.308658 -0.831470 0.461940 -v 0.212608 -0.923880 0.318190 -v 0.108387 -0.980785 0.162212 -v 0.000000 -1.000000 0.000000 -v 0.074658 0.980785 0.180240 -v 0.146447 0.923880 0.353554 -v 0.212608 0.831470 0.513280 -v 0.270598 0.707107 0.653281 -v 0.318190 0.555570 0.768178 -v 0.353553 0.382683 0.853553 -v 0.375330 0.195090 0.906127 -v 0.382683 0.000000 0.923879 -v 0.375330 -0.195090 0.906127 -v 0.353554 -0.382683 0.853553 -v 0.318190 -0.555570 0.768178 -v 0.270598 -0.707107 0.653281 -v 0.212608 -0.831470 0.513280 -v 0.146447 -0.923880 0.353553 -v 0.074658 -0.980785 0.180240 -v 0.038061 0.980785 0.191342 -v 0.074658 0.923880 0.375330 -v 0.108387 0.831470 0.544895 -v 0.137950 0.707107 0.693520 -v 0.162212 0.555570 0.815493 -v 0.180240 0.382683 0.906127 -v 0.191342 0.195090 0.961939 -v 0.195090 0.000000 0.980785 -v 0.191342 -0.195090 0.961939 -v 0.180240 -0.382683 0.906127 -v 0.162212 -0.555570 0.815493 -v 0.137950 -0.707107 0.693520 -v 0.108387 -0.831470 0.544895 -v 0.074658 -0.923880 0.375330 -v 0.038061 -0.980785 0.191342 -v 0.000000 0.980785 0.195091 -v 0.000000 0.923880 0.382683 -v 0.000000 0.831470 0.555570 -v 0.000000 0.707107 0.707107 -v 0.000000 0.555570 0.831469 -v 0.000000 0.382683 0.923879 -v 0.000000 0.195090 0.980785 -v 0.000000 0.000000 1.000000 -v 0.000000 -0.195090 0.980785 -v 0.000000 -0.382683 0.923879 -v 0.000000 -0.555570 0.831469 -v 0.000000 -0.707107 0.707107 -v 0.000000 -0.831470 0.555570 -v 0.000000 -0.923880 0.382683 -v 0.000000 -0.980785 0.195090 -v -0.038060 0.980785 0.191342 -v -0.074658 0.923880 0.375330 -v -0.108386 0.831470 0.544895 -v -0.137949 0.707107 0.693520 -v -0.162211 0.555570 0.815493 -v -0.180240 0.382683 0.906127 -v -0.191341 0.195090 0.961939 -v -0.195090 0.000000 0.980785 -v -0.191342 -0.195090 0.961939 -v -0.180240 -0.382683 0.906127 -v -0.162211 -0.555570 0.815493 -v -0.137949 -0.707107 0.693520 -v -0.108386 -0.831470 0.544895 -v -0.074658 -0.923880 0.375330 -v -0.038060 -0.980785 0.191342 -v -0.074658 0.980785 0.180240 -v -0.146446 0.923880 0.353553 -v -0.212607 0.831470 0.513280 -v -0.270598 0.707107 0.653281 -v -0.318189 0.555570 0.768177 -v -0.353553 0.382683 0.853553 -v -0.375330 0.195090 0.906127 -v -0.382683 0.000000 0.923879 -v -0.375330 -0.195090 0.906127 -v -0.353553 -0.382683 0.853553 -v -0.318189 -0.555570 0.768177 -v -0.270598 -0.707107 0.653281 -v -0.212607 -0.831470 0.513280 -v -0.146446 -0.923880 0.353553 -v -0.074658 -0.980785 0.180240 -v -0.108386 0.980785 0.162212 -v -0.212607 0.923880 0.318190 -v -0.308658 0.831470 0.461939 -v -0.392847 0.707107 0.587937 -v -0.461939 0.555570 0.691341 -v -0.513280 0.382683 0.768177 -v -0.544895 0.195090 0.815493 -v -0.555570 0.000000 0.831469 -v -0.544895 -0.195090 0.815493 -v -0.513279 -0.382683 0.768177 -v -0.461939 -0.555570 0.691341 -v -0.392847 -0.707107 0.587937 -v -0.308658 -0.831470 0.461939 -v -0.212607 -0.923880 0.318189 -v -0.108386 -0.980785 0.162212 -v -0.137950 0.980785 0.137950 -v -0.270598 0.923880 0.270598 -v -0.392847 0.831470 0.392847 -v -0.500000 0.707107 0.500000 -v -0.587937 0.555570 0.587937 -v -0.653281 0.382683 0.653281 -v -0.693519 0.195090 0.693519 -v -0.707106 0.000000 0.707106 -v -0.693520 -0.195090 0.693519 -v -0.653281 -0.382683 0.653281 -v -0.587937 -0.555570 0.587937 -v -0.500000 -0.707107 0.500000 -v -0.392847 -0.831470 0.392847 -v -0.270598 -0.923880 0.270598 -v -0.137949 -0.980785 0.137950 -v -0.162212 0.980785 0.108386 -v -0.318189 0.923880 0.212607 -v -0.461939 0.831470 0.308658 -v -0.587937 0.707107 0.392847 -v -0.691341 0.555570 0.461939 -v -0.768177 0.382683 0.513279 -v -0.815492 0.195090 0.544895 -v -0.831469 0.000000 0.555570 -v -0.815493 -0.195090 0.544895 -v -0.768177 -0.382683 0.513280 -v -0.691341 -0.555570 0.461939 -v -0.587937 -0.707107 0.392847 -v -0.461939 -0.831470 0.308658 -v -0.318189 -0.923880 0.212607 -v -0.162211 -0.980785 0.108386 -v 0.000000 1.000000 0.000000 -v -0.180240 0.980785 0.074658 -v -0.353553 0.923880 0.146446 -v -0.513279 0.831470 0.212607 -v -0.653281 0.707107 0.270598 -v -0.768177 0.555570 0.318189 -v -0.853553 0.382683 0.353553 -v -0.906127 0.195090 0.375330 -v -0.923879 0.000000 0.382683 -v -0.906127 -0.195090 0.375330 -v -0.853553 -0.382683 0.353553 -v -0.768177 -0.555570 0.318189 -v -0.653281 -0.707107 0.270598 -v -0.513279 -0.831470 0.212607 -v -0.353553 -0.923880 0.146446 -v -0.180240 -0.980785 0.074658 -v -0.191342 0.980785 0.038060 -v -0.375330 0.923880 0.074658 -v -0.544895 0.831470 0.108386 -v -0.693519 0.707107 0.137949 -v -0.815493 0.555570 0.162211 -v -0.906127 0.382683 0.180240 -v -0.961939 0.195090 0.191341 -v -0.980784 0.000000 0.195090 -v -0.961939 -0.195090 0.191341 -v -0.906127 -0.382683 0.180240 -v -0.815493 -0.555570 0.162211 -v -0.693519 -0.707107 0.137949 -v -0.544895 -0.831470 0.108386 -v -0.375330 -0.923880 0.074658 -v -0.191341 -0.980785 0.038060 -vt 0.225255 0.747791 -vt 0.200185 0.745510 -vt 0.202014 0.735870 -vt 0.083378 0.733891 -vt 0.045216 0.729934 -vt 0.089718 0.701687 -vt 0.132563 0.314124 -vt 0.159085 0.299902 -vt 0.147340 0.335836 -vt 0.116708 0.737324 -vt 0.103254 0.329885 -vt 0.146637 0.740347 -vt 0.121737 0.711556 -vt 0.069356 0.347937 -vt 0.121535 0.357021 -vt 0.206517 0.274331 -vt 0.228654 0.262287 -vt 0.231406 0.266316 -vt 0.174198 0.743051 -vt 0.150502 0.720360 -vt 0.029445 0.369408 -vt 0.091889 0.381279 -vt 0.183517 0.286764 -vt 0.212051 0.282443 -vt 0.177006 0.728389 -vt 0.000100 0.725360 -vt 0.053061 0.690360 -vt 0.191933 0.299115 -vt 0.226157 0.742999 -vt 0.205688 0.726773 -vt 0.068477 0.653078 -vt 0.170557 0.316746 -vt 0.166017 0.354256 -vt 0.102219 0.671338 -vt 0.131697 0.687265 -vt 0.120451 0.409593 -vt 0.234890 0.269729 -vt 0.158191 0.701512 -vt 0.056984 0.410042 -vt 0.202588 0.309583 -vt 0.182620 0.714557 -vt 0.009705 0.677072 -vt 0.028546 0.631587 -vt 0.185070 0.331027 -vt 0.219059 0.289318 -vt 0.215073 0.317772 -vt 0.190825 0.702086 -vt 0.055899 0.590652 -vt 0.202072 0.342206 -vt 0.227977 0.738475 -vt 0.211066 0.718568 -vt 0.090869 0.619520 -vt 0.187902 0.368689 -vt 0.120400 0.644012 -vt 0.144787 0.380062 -vt 0.172083 0.398133 -vt 0.146205 0.665384 -vt 0.238973 0.272397 -vt 0.169411 0.684525 -vt 0.091814 0.444541 -vt 0.153955 0.431817 -vt 0.202373 0.410550 -vt 0.227271 0.294693 -vt 0.236371 0.298363 -vt 0.183728 0.670054 -vt 0.132646 0.471641 -vt 0.191136 0.447112 -vt 0.228908 0.323369 -vt 0.201305 0.691455 -vt 0.119378 0.590975 -vt 0.220916 0.349860 -vt 0.230644 0.734393 -vt 0.234056 0.730909 -vt 0.143563 0.620758 -vt 0.212169 0.378591 -vt 0.164703 0.646753 -vt 0.170818 0.602470 -vt 0.234501 0.416839 -vt 0.186480 0.632090 -vt 0.230585 0.454892 -vt 0.243498 0.274217 -vt 0.248290 0.275119 -vt 0.200594 0.658655 -vt 0.177960 0.490317 -vt 0.246010 0.300188 -vt 0.217942 0.711569 -vt 0.213657 0.683073 -vt 0.090712 0.555840 -vt 0.131647 0.528489 -vt 0.240885 0.353700 -vt 0.226051 0.706046 -vt 0.238082 0.728159 -vt 0.235081 0.702211 -vt 0.152908 0.568541 -vt 0.201116 0.589850 -vt 0.237895 0.383583 -vt 0.261217 0.353579 -vt 0.267242 0.416758 -vt 0.219359 0.650764 -vt 0.253166 0.275070 -vt 0.226053 0.499845 -vt 0.275101 0.499845 -vt 0.243564 0.326164 -vt 0.255818 0.300099 -vt 0.227408 0.677262 -vt 0.190169 0.553079 -vt 0.244686 0.700212 -vt 0.177131 0.509649 -vt 0.229732 0.545184 -vt 0.258482 0.326051 -vt 0.281135 0.349501 -vt 0.242568 0.726246 -vt 0.233295 0.583384 -vt 0.264101 0.383473 -vt 0.210699 0.621956 -vt 0.299347 0.410306 -vt 0.239303 0.646686 -vt 0.270804 0.454854 -vt 0.265420 0.298100 -vt 0.323232 0.490300 -vt 0.257938 0.274070 -vt 0.262423 0.272159 -vt 0.242028 0.674245 -vt 0.259660 0.646578 -vt 0.310258 0.446989 -vt 0.368604 0.471560 -vt 0.273091 0.323033 -vt 0.286831 0.317227 -vt 0.254497 0.700125 -vt 0.225417 0.500045 -vt 0.274648 0.500045 -vt 0.299879 0.341621 -vt 0.247340 0.725246 -vt 0.266116 0.583319 -vt 0.289785 0.378264 -vt 0.236430 0.616742 -vt 0.329588 0.397724 -vt 0.262683 0.616648 -vt 0.313967 0.368151 -vt 0.356806 0.379489 -vt 0.279646 0.650442 -vt 0.347437 0.431590 -vt 0.274448 0.294268 -vt 0.266450 0.269410 -vt 0.256956 0.674139 -vt 0.409474 0.444332 -vt 0.299176 0.308854 -vt 0.264136 0.701954 -vt 0.270074 0.545159 -vt 0.309646 0.553004 -vt 0.316729 0.330240 -vt 0.252216 0.725196 -vt 0.298320 0.589659 -vt 0.346927 0.568418 -vt 0.335718 0.353520 -vt 0.331040 0.315792 -vt 0.288451 0.621678 -vt 0.328668 0.602160 -vt 0.379955 0.356294 -vt 0.312741 0.631638 -vt 0.380916 0.409238 -vt 0.282555 0.288749 -vt 0.269863 0.265928 -vt 0.271617 0.676946 -vt 0.298495 0.658132 -vt 0.444269 0.409650 -vt 0.289430 0.281755 -vt 0.273233 0.705628 -vt 0.322933 0.509649 -vt 0.257008 0.726098 -vt 0.285450 0.682561 -vt 0.281439 0.711006 -vt 0.368417 0.528488 -vt 0.380485 0.590809 -vt 0.309653 0.298235 -vt 0.342262 0.298829 -vt 0.261532 0.727917 -vt 0.355994 0.620341 -vt 0.354206 0.334928 -vt 0.398144 0.329027 -vt 0.334623 0.646146 -vt 0.409408 0.380782 -vt 0.272531 0.261848 -vt 0.315481 0.669351 -vt 0.471647 0.368836 -vt 0.294810 0.273555 -vt 0.274352 0.257325 -vt 0.297921 0.690765 -vt 0.329952 0.683669 -vt 0.431815 0.347310 -vt 0.447272 0.310101 -vt 0.317860 0.285776 -vt 0.323481 0.271955 -vt 0.288438 0.717882 -vt 0.409352 0.555839 -vt 0.444165 0.590651 -vt 0.349962 0.280001 -vt 0.265614 0.730584 -vt 0.379248 0.643503 -vt 0.368718 0.313085 -vt 0.410673 0.298729 -vt 0.353253 0.664643 -vt 0.378696 0.288828 -vt 0.417056 0.266562 -vt 0.367917 0.686420 -vt 0.298488 0.264462 -vt 0.275256 0.252534 -vt 0.308552 0.701245 -vt 0.341352 0.700534 -vt 0.490551 0.323453 -vt 0.455180 0.270580 -vt 0.300322 0.254827 -vt 0.293961 0.725991 -vt 0.409030 0.619318 -vt 0.431466 0.652847 -vt 0.353845 0.260029 -vt 0.269097 0.733996 -vt 0.397537 0.670758 -vt 0.383754 0.263085 -vt 0.410157 0.701056 -vt 0.353758 0.239681 -vt 0.417043 0.233759 -vt 0.378051 0.710639 -vt 0.275208 0.247658 -vt 0.316934 0.713598 -vt 0.349243 0.719300 -vt 0.500246 0.275239 -vt 0.455230 0.230265 -vt 0.326298 0.257302 -vt 0.300241 0.245018 -vt 0.322745 0.727349 -vt 0.471518 0.631585 -vt 0.490359 0.677070 -vt 0.271848 0.738023 -vt 0.297795 0.735022 -vt 0.299795 0.744627 -vt 0.446928 0.690109 -vt 0.454824 0.729672 -vt 0.326204 0.242379 -vt 0.349704 0.219736 -vt 0.273760 0.742508 -vt 0.416624 0.733235 -vt 0.383694 0.236844 -vt 0.378518 0.211113 -vt 0.410632 0.201581 -vt 0.383265 0.736370 -vt 0.274210 0.242885 -vt 0.353321 0.739244 -vt 0.500353 0.226044 -vt 0.447414 0.190702 -vt 0.298248 0.235412 -vt 0.325761 0.741969 -vt 0.353429 0.759600 -vt 0.490860 0.177758 -vt 0.472125 0.132236 -vt 0.323201 0.227758 -vt 0.317403 0.214003 -vt 0.325868 0.756896 -vt 0.499965 0.725357 -vt 0.454850 0.770016 -vt 0.341835 0.200963 -vt 0.274761 0.747281 -vt 0.299881 0.754438 -vt 0.416688 0.766057 -vt 0.398063 0.171264 -vt 0.383359 0.762624 -vt 0.272300 0.238399 -vt 0.378329 0.788391 -vt 0.432026 0.153414 -vt 0.379817 0.143974 -vt 0.294420 0.226379 -vt 0.288902 0.218266 -vt 0.349564 0.779587 -vt 0.444860 0.091230 -vt 0.309031 0.201641 -vt 0.323060 0.771558 -vt 0.499965 0.774590 -vt 0.490359 0.822877 -vt 0.330453 0.184082 -vt 0.274811 0.752156 -vt 0.298053 0.764077 -vt 0.410348 0.798261 -vt 0.368419 0.186882 -vt 0.353783 0.165081 -vt 0.315993 0.169744 -vt 0.397847 0.828609 -vt 0.356591 0.120763 -vt 0.368368 0.812683 -vt 0.409652 0.119834 -vt 0.269552 0.234371 -vt 0.281907 0.211384 -vt 0.341874 0.798436 -vt 0.410106 0.056322 -vt 0.317446 0.785390 -vt 0.447004 0.809588 -vt 0.471518 0.868362 -vt 0.273909 0.756948 -vt 0.294379 0.773174 -vt 0.431588 0.846870 -vt 0.444165 0.909296 -vt 0.298407 0.191149 -vt 0.285937 0.182932 -vt 0.272090 0.761472 -vt 0.289000 0.781379 -vt 0.379665 0.855935 -vt 0.335171 0.146551 -vt 0.299010 0.158502 -vt 0.329274 0.102527 -vt 0.353860 0.834563 -vt 0.381148 0.091257 -vt 0.266070 0.230957 -vt 0.261988 0.228288 -vt 0.330655 0.815422 -vt 0.369195 0.028858 -vt 0.273702 0.206000 -vt 0.309241 0.797861 -vt 0.316338 0.829893 -vt 0.347606 0.068785 -vt 0.310311 0.053289 -vt 0.264604 0.202320 -vt 0.282125 0.788378 -vt 0.409196 0.880428 -vt 0.380687 0.908971 -vt 0.280156 0.150790 -vt 0.269423 0.765554 -vt 0.356502 0.879189 -vt 0.313295 0.132007 -vt 0.288996 0.122010 -vt 0.335363 0.853194 -vt 0.298915 0.089970 -vt 0.257465 0.226466 -vt 0.313586 0.867857 -vt 0.266681 0.083580 -vt 0.252672 0.225562 -vt 0.298761 0.808492 -vt 0.299472 0.841292 -vt 0.323696 0.009902 -vt 0.270697 0.045369 -vt 0.272103 0.177305 -vt 0.254962 0.200486 -vt 0.274016 0.793901 -vt 0.409352 0.944107 -vt 0.368417 0.971457 -vt 0.260157 0.146905 -vt 0.266010 0.769038 -vt 0.329248 0.897477 -vt 0.263208 0.116948 -vt 0.239780 0.147001 -vt 0.298949 0.910096 -vt 0.236922 0.117019 -vt 0.289367 0.877990 -vt 0.230285 0.045337 -vt 0.247796 0.225611 -vt 0.286409 0.816874 -vt 0.280707 0.849182 -vt 0.275354 0.000188 -vt 0.257434 0.174487 -vt 0.245148 0.200570 -vt 0.272658 0.822685 -vt 0.347157 0.931405 -vt 0.322933 0.990296 -vt 0.261984 0.771788 -vt 0.264985 0.797736 -vt 0.309896 0.946866 -vt 0.274648 0.999900 -vt 0.242496 0.174587 -vt 0.219813 0.151075 -vt 0.257499 0.773701 -vt 0.255380 0.799735 -vt 0.266771 0.916562 -vt 0.233811 0.083608 -vt 0.211151 0.122224 -vt 0.260763 0.853260 -vt 0.190633 0.053201 -vt 0.243022 0.226611 -vt 0.226029 0.000100 -vt 0.227864 0.177601 -vt 0.258038 0.825701 -vt 0.240407 0.853369 -vt 0.177617 0.009651 -vt 0.153269 0.068666 -vt 0.235538 0.202568 -vt 0.226504 0.206403 -vt 0.243111 0.825808 -vt 0.270334 0.954761 -vt 0.225418 0.999900 -vt 0.201023 0.158972 -vt 0.252726 0.774701 -vt 0.245569 0.799822 -vt 0.233950 0.916627 -vt 0.263636 0.883204 -vt 0.201571 0.090057 -vt 0.171205 0.102684 -vt 0.237383 0.883298 -vt 0.211616 0.878268 -vt 0.119638 0.091145 -vt 0.238536 0.228522 -vt 0.234509 0.231273 -vt 0.220420 0.849504 -vt 0.131984 0.028484 -vt 0.214102 0.183416 -vt 0.201741 0.191807 -vt 0.228449 0.823000 -vt 0.229992 0.954787 -vt 0.177134 0.990295 -vt 0.184138 0.170388 -vt 0.247850 0.774751 -vt 0.235930 0.797993 -vt 0.201747 0.910287 -vt 0.186890 0.132366 -vt 0.143886 0.121008 -vt 0.171399 0.897786 -vt 0.165075 0.147055 -vt 0.146552 0.165728 -vt 0.187325 0.868308 -vt 0.091044 0.119777 -vt 0.218392 0.211929 -vt 0.231097 0.234756 -vt 0.201572 0.841815 -vt 0.090895 0.055886 -vt 0.211516 0.218931 -vt 0.214617 0.817386 -vt 0.190421 0.946942 -vt 0.131651 0.971456 -vt 0.169810 0.184885 -vt 0.243058 0.773849 -vt 0.226833 0.794319 -vt 0.191258 0.202450 -vt 0.158594 0.201902 -vt 0.238534 0.772030 -vt 0.218627 0.788941 -vt 0.153140 0.931527 -vt 0.144074 0.879606 -vt 0.120673 0.144325 -vt 0.132038 0.187664 -vt 0.165444 0.853801 -vt 0.068599 0.153461 -vt 0.228430 0.238838 -vt 0.184586 0.830596 -vt 0.055942 0.090813 -vt 0.206141 0.227140 -vt 0.090717 0.944106 -vt 0.028491 0.131928 -vt 0.053184 0.190897 -vt 0.183058 0.214934 -vt 0.177458 0.228777 -vt 0.202146 0.809182 -vt 0.191515 0.798702 -vt 0.119583 0.909137 -vt 0.055904 0.909296 -vt 0.150924 0.220780 -vt 0.234452 0.769363 -vt 0.211629 0.782065 -vt 0.120819 0.856444 -vt 0.122098 0.212014 -vt 0.102468 0.171737 -vt 0.146814 0.835304 -vt 0.226611 0.243361 -vt 0.170115 0.816278 -vt 0.132150 0.813527 -vt 0.089978 0.202184 -vt 0.045407 0.230630 -vt 0.202473 0.236239 -vt 0.225710 0.248151 -vt 0.158715 0.799413 -vt 0.009624 0.177645 -vt 0.174671 0.243442 -vt 0.183133 0.786349 -vt 0.091038 0.880630 -vt 0.028551 0.868363 -vt 0.147097 0.240787 -vt 0.230969 0.765951 -vt 0.206106 0.773956 -vt 0.102531 0.829190 -vt 0.117118 0.237835 -vt 0.089910 0.798892 -vt 0.083689 0.234486 -vt 0.117297 0.264119 -vt 0.122016 0.789308 -vt 0.045571 0.271108 -vt 0.200651 0.245876 -vt 0.225760 0.253025 -vt 0.150824 0.780648 -vt 0.000100 0.226189 -vt 0.200746 0.255680 -vt 0.202271 0.764925 -vt 0.068603 0.847101 -vt 0.009709 0.822880 -vt 0.147262 0.261143 -vt 0.228218 0.761924 -vt 0.226306 0.757439 -vt 0.174805 0.258361 -vt 0.151408 0.281052 -vt 0.200272 0.755320 -vt 0.053139 0.809840 -vt 0.083443 0.766713 -vt 0.122641 0.289821 -vt 0.083834 0.267394 -vt 0.116802 0.763577 -vt 0.053666 0.310742 -vt 0.226759 0.257795 -vt 0.177322 0.772599 -vt 0.146746 0.760704 -vt 0.000312 0.275649 -vt 0.202750 0.265274 -vt 0.000102 0.774593 -vt 0.250033 0.749973 -vt 0.250481 0.250342 -vt 0.225305 0.752666 -vt 0.010250 0.324041 -vt 0.177847 0.272958 -vt 0.174305 0.757979 -vt 0.045242 0.770277 -vt 0.090373 0.299673 -usemtl None -s off -f 15/1 14/2 29/3 -f 10/4 9/5 25/6 -f 5/7 4/8 20/9 -f 11/10 10/4 25/6 -f 6/11 5/7 20/9 -f 12/12 11/10 26/13 -f 7/14 6/11 21/15 -f 2/16 1/17 16/18 -f 13/19 12/12 27/20 -f 8/21 7/14 22/22 -f 3/23 2/16 17/24 -f 14/2 13/19 28/25 -f 9/5 8/26 24/27 -f 4/8 3/23 18/28 -f 30/29 29/3 44/30 -f 25/6 24/27 39/31 -f 20/9 19/32 35/33 -f 26/13 25/6 40/34 -f 21/15 20/9 35/33 -f 27/20 26/13 41/35 -f 22/22 21/15 37/36 -f 17/24 16/18 31/37 -f 28/25 27/20 42/38 -f 23/39 22/22 37/36 -f 18/28 17/24 33/40 -f 29/3 28/25 43/41 -f 24/27 23/42 38/43 -f 19/32 18/28 34/44 -f 33/40 32/45 48/46 -f 44/30 43/41 58/47 -f 39/31 38/43 53/48 -f 34/44 33/40 49/49 -f 45/50 44/30 59/51 -f 40/34 39/31 54/52 -f 35/33 34/44 50/53 -f 41/35 40/34 55/54 -f 36/55 35/33 51/56 -f 42/38 41/35 56/57 -f 37/36 36/55 51/56 -f 32/45 31/37 46/58 -f 43/41 42/38 57/59 -f 38/60 37/36 52/61 -f 52/61 51/56 66/62 -f 47/63 46/58 62/64 -f 58/47 57/59 72/65 -f 53/66 52/61 67/67 -f 48/46 47/63 63/68 -f 59/51 58/47 73/69 -f 54/52 53/48 69/70 -f 49/49 48/46 64/71 -f 60/72 59/51 75/73 -f 55/54 54/52 70/74 -f 50/53 49/49 65/75 -f 56/57 55/54 70/74 -f 51/56 50/53 66/62 -f 57/59 56/57 71/76 -f 71/76 70/74 85/77 -f 66/62 65/75 81/78 -f 72/65 71/76 86/79 -f 67/67 66/62 82/80 -f 62/64 61/81 76/82 -f 73/69 72/65 87/83 -f 68/84 67/67 82/80 -f 63/68 62/64 77/85 -f 74/86 73/69 88/87 -f 69/70 68/88 83/89 -f 64/71 63/68 79/90 -f 75/73 74/86 89/91 -f 70/74 69/70 85/77 -f 65/75 64/71 79/90 -f 90/92 89/91 104/93 -f 85/77 84/94 100/95 -f 80/96 79/90 94/97 -f 86/79 85/77 100/95 -f 81/78 80/96 96/98 -f 87/83 86/79 102/99 -f 82/80 81/78 96/98 -f 77/85 76/82 91/100 -f 88/87 87/83 102/99 -f 83/101 82/80 98/102 -f 78/103 77/85 92/104 -f 89/91 88/87 103/105 -f 84/94 83/89 99/106 -f 79/90 78/103 94/97 -f 104/93 103/105 119/107 -f 99/106 98/108 114/109 -f 94/97 93/110 109/111 -f 105/112 104/93 119/107 -f 100/95 99/106 115/113 -f 95/114 94/97 109/111 -f 101/115 100/95 115/113 -f 96/98 95/114 111/116 -f 102/99 101/115 117/117 -f 97/118 96/98 111/116 -f 92/104 91/100 107/119 -f 103/105 102/99 117/117 -f 98/102 97/118 113/120 -f 93/110 92/104 107/119 -f 107/119 106/121 121/122 -f 118/123 117/117 132/124 -f 113/120 112/125 128/126 -f 108/127 107/119 123/128 -f 119/107 118/123 134/129 -f 114/109 113/130 128/131 -f 109/111 108/127 124/132 -f 120/133 119/107 134/129 -f 115/113 114/109 130/134 -f 110/135 109/111 124/132 -f 116/136 115/113 130/134 -f 111/116 110/135 126/137 -f 117/117 116/136 131/138 -f 112/125 111/116 126/137 -f 126/137 125/139 141/140 -f 132/124 131/138 147/141 -f 127/142 126/137 141/140 -f 122/143 121/122 136/144 -f 133/145 132/124 147/141 -f 128/126 127/142 143/146 -f 123/128 122/143 138/147 -f 134/129 133/145 149/148 -f 129/149 128/131 144/150 -f 124/132 123/128 139/151 -f 135/152 134/129 149/148 -f 130/134 129/149 145/153 -f 125/139 124/132 139/151 -f 131/138 130/134 145/153 -f 145/153 144/150 159/154 -f 140/155 139/151 154/156 -f 146/157 145/153 160/158 -f 141/140 140/155 156/159 -f 147/141 146/157 161/160 -f 142/161 141/140 156/159 -f 137/162 136/144 151/163 -f 148/164 147/141 162/165 -f 143/146 142/161 158/166 -f 138/147 137/162 152/167 -f 149/148 148/164 164/168 -f 144/150 143/169 159/154 -f 139/151 138/147 154/156 -f 150/170 149/148 164/168 -f 164/168 163/171 179/172 -f 159/154 158/173 174/174 -f 154/156 153/175 169/176 -f 165/177 164/168 179/172 -f 160/158 159/154 175/178 -f 155/179 154/156 169/176 -f 161/160 160/158 175/178 -f 156/159 155/179 171/180 -f 162/165 161/160 176/181 -f 157/182 156/159 171/180 -f 152/167 151/163 166/183 -f 163/171 162/165 177/184 -f 158/166 157/182 173/185 -f 153/175 152/167 167/186 -f 167/186 166/183 181/187 -f 178/188 177/184 192/189 -f 173/185 172/190 187/191 -f 168/192 167/186 183/193 -f 179/172 178/188 194/194 -f 174/174 173/195 188/196 -f 169/176 168/192 184/197 -f 180/198 179/172 194/194 -f 175/178 174/174 190/199 -f 170/200 169/176 184/197 -f 176/181 175/178 190/199 -f 171/180 170/200 186/201 -f 177/184 176/181 191/202 -f 172/190 171/180 186/201 -f 186/201 185/203 201/204 -f 192/189 191/202 206/205 -f 187/191 186/201 201/204 -f 182/206 181/187 196/207 -f 193/208 192/189 207/209 -f 188/210 187/191 202/211 -f 183/193 182/206 197/212 -f 194/194 193/208 209/213 -f 189/214 188/196 204/215 -f 184/197 183/193 199/216 -f 195/217 194/194 209/213 -f 190/199 189/214 205/218 -f 185/203 184/197 200/219 -f 191/202 190/199 205/218 -f 205/218 204/215 220/220 -f 200/219 199/216 214/221 -f 206/205 205/218 220/220 -f 201/204 200/219 216/222 -f 207/209 206/205 221/223 -f 202/211 201/204 216/222 -f 197/212 196/207 211/224 -f 208/225 207/209 222/226 -f 203/227 202/211 217/228 -f 198/229 197/212 212/230 -f 209/213 208/225 223/231 -f 204/215 203/232 218/233 -f 199/216 198/229 214/221 -f 210/234 209/213 224/235 -f 224/235 223/231 239/236 -f 219/237 218/233 234/238 -f 214/221 213/239 229/240 -f 225/241 224/235 239/236 -f 220/220 219/237 235/242 -f 215/243 214/221 230/244 -f 221/223 220/220 235/242 -f 216/222 215/243 231/245 -f 222/226 221/223 236/246 -f 217/228 216/222 231/245 -f 212/230 211/224 226/247 -f 223/231 222/226 237/248 -f 218/249 217/228 232/250 -f 213/239 212/230 227/251 -f 238/252 237/248 252/253 -f 233/254 232/250 248/255 -f 228/256 227/251 243/257 -f 239/236 238/252 253/258 -f 234/238 233/259 249/260 -f 229/240 228/256 244/261 -f 240/262 239/236 254/263 -f 235/242 234/238 250/264 -f 230/244 229/240 244/261 -f 236/246 235/242 250/264 -f 231/245 230/244 246/265 -f 237/248 236/246 251/266 -f 232/250 231/245 246/265 -f 227/251 226/247 241/267 -f 252/253 251/266 266/268 -f 247/269 246/265 261/270 -f 242/271 241/267 257/272 -f 253/258 252/253 267/273 -f 248/255 247/269 263/274 -f 243/257 242/271 258/275 -f 254/263 253/258 268/276 -f 249/260 248/277 263/278 -f 244/261 243/257 259/279 -f 255/280 254/263 269/281 -f 250/264 249/260 265/282 -f 245/283 244/261 259/279 -f 251/266 250/264 265/282 -f 246/265 245/283 261/270 -f 260/284 259/279 274/285 -f 266/268 265/282 280/286 -f 261/270 260/284 276/287 -f 267/273 266/268 281/288 -f 262/289 261/270 276/287 -f 257/272 256/290 272/291 -f 268/276 267/273 282/292 -f 263/274 262/289 278/293 -f 258/275 257/272 272/291 -f 269/281 268/276 283/294 -f 264/295 263/278 278/296 -f 259/279 258/275 274/285 -f 270/297 269/281 284/298 -f 265/282 264/295 280/286 -f 279/299 278/296 293/300 -f 274/285 273/301 288/302 -f 285/303 284/298 299/304 -f 280/286 279/299 295/305 -f 275/306 274/285 289/307 -f 281/288 280/286 295/305 -f 276/287 275/306 291/308 -f 282/292 281/288 296/309 -f 277/310 276/287 291/308 -f 272/291 271/311 286/312 -f 283/294 282/292 297/313 -f 278/293 277/310 293/314 -f 273/301 272/291 287/315 -f 284/298 283/294 299/304 -f 298/316 297/313 312/317 -f 293/314 292/318 307/319 -f 288/302 287/315 302/320 -f 299/304 298/316 314/321 -f 294/322 293/300 309/323 -f 289/307 288/302 304/324 -f 300/325 299/304 314/321 -f 295/305 294/322 310/326 -f 290/327 289/307 304/324 -f 296/309 295/305 310/326 -f 291/308 290/327 305/328 -f 297/313 296/309 311/329 -f 292/318 291/308 306/330 -f 287/315 286/312 301/331 -f 312/317 311/329 326/332 -f 307/319 306/330 321/333 -f 302/320 301/331 316/334 -f 313/335 312/317 327/336 -f 308/337 307/319 322/338 -f 303/339 302/320 317/340 -f 314/321 313/335 329/341 -f 309/323 308/342 323/343 -f 304/324 303/339 319/344 -f 315/345 314/321 329/341 -f 310/326 309/323 325/346 -f 305/328 304/324 319/344 -f 311/329 310/326 325/346 -f 306/330 305/328 320/347 -f 320/347 319/344 335/348 -f 326/332 325/346 341/349 -f 321/333 320/347 336/350 -f 327/336 326/332 342/351 -f 322/338 321/333 338/352 -f 317/340 316/334 332/353 -f 328/354 327/336 343/355 -f 323/356 322/338 338/352 -f 318/357 317/340 333/358 -f 329/341 328/354 344/359 -f 324/360 323/343 339/361 -f 319/344 318/357 335/348 -f 330/362 329/341 345/363 -f 325/346 324/360 341/349 -f 340/364 339/361 354/365 -f 335/348 334/366 350/367 -f 346/368 345/363 360/369 -f 341/349 340/364 356/370 -f 336/350 335/348 350/367 -f 342/351 341/349 356/370 -f 337/371 336/350 351/372 -f 343/355 342/351 358/373 -f 338/352 337/371 353/374 -f 333/358 332/353 347/375 -f 344/359 343/355 358/373 -f 339/376 338/352 353/374 -f 334/366 333/358 349/377 -f 345/363 344/359 359/378 -f 359/378 358/373 373/379 -f 354/380 353/374 368/381 -f 349/377 348/382 363/383 -f 360/369 359/378 374/384 -f 355/385 354/365 369/386 -f 350/367 349/377 365/387 -f 361/388 360/369 375/389 -f 356/370 355/385 371/390 -f 351/372 350/367 365/387 -f 357/391 356/370 371/390 -f 352/392 351/372 367/393 -f 358/373 357/391 373/379 -f 353/374 352/392 368/381 -f 348/382 347/375 363/383 -f 373/379 372/394 387/395 -f 368/381 367/393 383/396 -f 363/383 362/397 377/398 -f 374/384 373/379 388/399 -f 369/400 368/381 383/396 -f 364/401 363/383 379/402 -f 375/389 374/384 389/403 -f 370/404 369/386 384/405 -f 365/387 364/401 380/406 -f 376/407 375/389 390/408 -f 371/390 370/404 386/409 -f 366/410 365/387 380/406 -f 372/394 371/390 386/409 -f 367/393 366/410 382/411 -f 387/395 386/409 401/412 -f 382/411 381/413 396/414 -f 388/399 387/395 402/415 -f 383/396 382/411 398/416 -f 378/417 377/398 392/418 -f 389/403 388/399 403/419 -f 384/420 383/396 398/416 -f 379/402 378/417 393/421 -f 390/408 389/403 404/422 -f 385/423 384/405 399/424 -f 380/406 379/402 395/425 -f 391/426 390/408 405/427 -f 386/409 385/423 401/412 -f 381/413 380/406 396/414 -f 395/425 394/428 410/429 -f 406/430 405/427 420/431 -f 401/412 400/432 416/433 -f 396/414 395/425 410/429 -f 402/415 401/412 416/433 -f 397/434 396/414 411/435 -f 403/419 402/415 417/436 -f 398/416 397/434 413/437 -f 393/421 392/418 407/438 -f 404/422 403/419 418/439 -f 399/440 398/416 413/437 -f 394/428 393/421 408/441 -f 405/427 404/422 420/431 -f 400/432 399/424 414/442 -f 414/443 413/437 428/444 -f 409/445 408/441 424/446 -f 420/431 419/447 434/448 -f 415/449 414/442 429/450 -f 410/429 409/445 425/451 -f 421/452 420/431 435/453 -f 416/433 415/449 431/454 -f 411/435 410/429 426/455 -f 417/436 416/433 431/454 -f 412/456 411/435 426/455 -f 418/439 417/436 432/457 -f 413/437 412/456 428/444 -f 408/441 407/438 422/458 -f 419/447 418/439 433/459 -f 433/459 432/457 447/460 -f 428/444 427/461 443/462 -f 423/463 422/458 437/464 -f 434/448 433/459 448/465 -f 429/466 428/444 443/462 -f 424/446 423/463 439/467 -f 435/453 434/448 449/468 -f 430/469 429/450 444/470 -f 425/451 424/446 440/471 -f 436/472 435/453 450/473 -f 431/454 430/469 446/474 -f 426/455 425/451 441/475 -f 432/457 431/454 446/474 -f 427/461 426/455 441/475 -f 447/460 446/474 462/476 -f 442/477 441/475 457/478 -f 448/465 447/460 463/479 -f 443/462 442/477 459/480 -f 438/481 437/464 453/482 -f 449/468 448/465 464/483 -f 444/484 443/462 459/480 -f 439/467 438/481 454/485 -f 450/473 449/468 466/486 -f 445/487 444/470 460/488 -f 440/471 439/467 456/489 -f 451/490 450/473 467/491 -f 446/474 445/487 462/476 -f 441/475 440/471 456/489 -f 456/489 455/492 471/493 -f 467/491 466/486 481/494 -f 462/476 461/495 477/496 -f 457/478 456/489 472/497 -f 463/479 462/476 477/496 -f 458/498 457/478 472/497 -f 464/483 463/479 478/499 -f 459/480 458/498 474/500 -f 454/485 453/482 468/501 -f 465/502 464/483 479/503 -f 460/504 459/480 474/500 -f 455/492 454/485 469/505 -f 466/486 465/502 481/494 -f 461/495 460/488 475/506 -f 331/507 15/1 30/29 -f 1/17 452/508 16/18 -f 331/507 30/29 45/50 -f 16/18 452/508 31/37 -f 331/507 45/50 60/72 -f 31/37 452/508 46/58 -f 331/507 60/72 75/73 -f 46/58 452/508 61/81 -f 61/81 452/508 76/82 -f 331/507 75/73 90/92 -f 331/507 90/92 105/112 -f 76/82 452/508 91/100 -f 331/507 105/112 120/133 -f 91/100 452/508 106/121 -f 331/507 120/133 135/152 -f 106/121 452/508 121/122 -f 121/122 452/508 136/144 -f 331/507 135/152 150/170 -f 331/507 150/170 165/177 -f 136/144 452/508 151/163 -f 331/507 165/177 180/198 -f 151/163 452/508 166/183 -f 331/507 180/198 195/217 -f 166/183 452/508 181/187 -f 181/187 452/508 196/207 -f 331/507 195/217 210/234 -f 331/507 210/234 225/241 -f 196/207 452/508 211/224 -f 331/507 225/241 240/262 -f 211/224 452/508 226/247 -f 331/507 240/262 255/280 -f 226/247 452/508 241/267 -f 241/267 452/508 256/290 -f 331/507 255/280 270/297 -f 331/507 270/297 285/303 -f 256/290 452/508 271/311 -f 331/507 285/303 300/325 -f 271/311 452/508 286/312 -f 331/507 300/325 315/345 -f 286/312 452/508 301/331 -f 301/331 452/508 316/334 -f 331/507 315/345 330/362 -f 331/507 330/362 346/368 -f 316/334 452/508 332/353 -f 331/507 346/368 361/388 -f 332/353 452/508 347/375 -f 331/507 361/388 376/407 -f 347/375 452/508 362/397 -f 331/507 376/407 391/426 -f 362/397 452/508 377/398 -f 331/507 391/426 406/430 -f 377/398 452/508 392/418 -f 331/507 406/430 421/452 -f 392/418 452/508 407/438 -f 331/507 421/452 436/472 -f 407/438 452/508 422/458 -f 331/507 436/472 451/490 -f 422/458 452/508 437/464 -f 331/507 451/490 467/491 -f 437/464 452/508 453/482 -f 331/507 467/491 482/509 -f 453/482 452/508 468/501 -f 475/510 474/500 7/14 -f 470/511 469/505 2/16 -f 481/494 480/512 14/2 -f 476/513 475/506 8/26 -f 471/493 470/511 3/23 -f 482/509 481/494 15/1 -f 477/496 476/513 10/4 -f 472/497 471/493 4/8 -f 331/507 482/509 15/1 -f 478/499 477/496 11/10 -f 473/514 472/497 5/7 -f 468/501 452/508 1/17 -f 479/503 478/499 12/12 -f 474/500 473/514 6/11 -f 469/505 468/501 1/17 -f 480/512 479/503 13/19 -f 30/29 15/1 29/3 -f 183/193 198/229 199/216 -f 456/489 471/493 472/497 -f 26/13 11/10 25/6 -f 21/15 6/11 20/9 -f 27/20 12/12 26/13 -f 22/22 7/14 21/15 -f 17/24 2/16 16/18 -f 28/25 13/19 27/20 -f 23/39 8/21 22/22 -f 18/28 3/23 17/24 -f 29/3 14/2 28/25 -f 321/333 337/371 338/352 -f 19/32 4/8 18/28 -f 45/50 30/29 44/30 -f 40/34 25/6 39/31 -f 380/406 395/425 396/414 -f 41/35 26/13 40/34 -f 36/55 21/15 35/33 -f 42/38 27/20 41/35 -f 54/52 69/70 70/74 -f 32/45 17/24 31/37 -f 43/41 28/25 42/38 -f 38/60 23/39 37/36 -f 242/271 257/272 258/275 -f 44/30 29/3 43/41 -f 39/31 24/27 38/43 -f 4/8 19/32 20/9 -f 342/351 357/391 358/373 -f 59/51 44/30 58/47 -f 54/52 39/31 53/48 -f 449/468 465/502 466/486 -f 60/72 45/50 59/51 -f 55/54 40/34 54/52 -f 247/269 262/289 263/274 -f 56/57 41/35 55/54 -f 214/221 229/240 230/244 -f 57/59 42/38 56/57 -f 52/61 37/36 51/56 -f 47/63 32/45 46/58 -f 58/47 43/41 57/59 -f 53/66 38/60 52/61 -f 67/67 52/61 66/62 -f 241/267 256/290 257/272 -f 73/69 58/47 72/65 -f 68/84 53/66 67/67 -f 84/94 99/106 100/95 -f 74/86 59/51 73/69 -f 83/89 98/108 99/106 -f 33/40 48/46 49/49 -f 256/290 271/311 272/291 -f 157/182 172/190 173/185 -f 465/502 480/512 481/494 -f 71/76 56/57 70/74 -f 142/161 157/182 158/166 -f 72/65 57/59 71/76 -f 86/79 71/76 85/77 -f 168/192 183/193 184/197 -f 87/83 72/65 86/79 -f 423/463 438/481 439/467 -f 77/85 62/64 76/82 -f 88/87 73/69 87/83 -f 83/101 68/84 82/80 -f 78/103 63/68 77/85 -f 89/91 74/86 88/87 -f 84/94 69/70 83/89 -f 122/143 137/162 138/147 -f 90/92 75/73 89/91 -f 333/358 348/382 349/377 -f 80/96 65/75 79/90 -f 105/112 90/92 104/93 -f 143/169 158/173 159/154 -f 95/114 80/96 94/97 -f 101/115 86/79 100/95 -f 334/366 349/377 350/367 -f 148/164 163/171 164/168 -f 97/118 82/80 96/98 -f 92/104 77/85 91/100 -f 103/105 88/87 102/99 -f 69/70 84/94 85/77 -f 93/110 78/103 92/104 -f 104/93 89/91 103/105 -f 193/208 208/225 209/213 -f 48/46 63/68 64/71 -f 49/49 64/71 65/75 -f 114/109 129/149 130/134 -f 249/260 264/295 265/282 -f 120/133 105/112 119/107 -f 101/115 116/136 117/117 -f 110/135 95/114 109/111 -f 116/136 101/115 115/113 -f 234/238 249/260 250/264 -f 9/5 24/27 25/6 -f 112/125 97/118 111/116 -f 450/473 466/486 467/491 -f 118/123 103/105 117/117 -f 112/125 127/142 128/126 -f 108/127 93/110 107/119 -f 122/143 107/119 121/122 -f 133/145 118/123 132/124 -f 35/33 50/53 51/56 -f 184/197 199/216 200/219 -f 66/62 81/78 82/80 -f 129/149 114/109 128/131 -f 108/127 123/128 124/132 -f 135/152 120/133 134/129 -f 298/316 313/335 314/321 -f 125/139 110/135 124/132 -f 131/138 116/136 130/134 -f 337/371 352/392 353/374 -f 132/124 117/117 131/138 -f 127/142 112/125 126/137 -f 243/257 258/275 259/279 -f 347/375 362/397 363/383 -f 142/161 127/142 141/140 -f 137/162 122/143 136/144 -f 148/164 133/145 147/141 -f 53/48 68/88 69/70 -f 128/131 143/169 144/150 -f 47/63 62/64 63/68 -f 163/171 178/188 179/172 -f 80/96 95/114 96/98 -f 150/170 135/152 149/148 -f 167/186 182/206 183/193 -f 140/155 125/139 139/151 -f 146/157 131/138 145/153 -f 160/158 145/153 159/154 -f 155/179 140/155 154/156 -f 161/160 146/157 160/158 -f 318/357 334/366 335/348 -f 162/165 147/141 161/160 -f 157/182 142/161 156/159 -f 152/167 137/162 151/163 -f 163/171 148/164 162/165 -f 158/173 173/195 174/174 -f 153/175 138/147 152/167 -f 19/32 34/44 35/33 -f 357/391 372/394 373/379 -f 138/147 153/175 154/156 -f 165/177 150/170 164/168 -f 18/28 33/40 34/44 -f 233/259 248/277 249/260 -f 153/175 168/192 169/176 -f 180/198 165/177 179/172 -f 228/256 243/257 244/261 -f 170/200 155/179 169/176 -f 176/181 161/160 175/178 -f 34/44 49/49 50/53 -f 177/184 162/165 176/181 -f 172/190 157/182 171/180 -f 167/186 152/167 166/183 -f 178/188 163/171 177/184 -f 223/231 238/252 239/236 -f 168/192 153/175 167/186 -f 182/206 167/186 181/187 -f 193/208 178/188 192/189 -f 188/210 173/185 187/191 -f 313/335 328/354 329/341 -f 363/383 378/417 379/402 -f 189/214 174/174 188/196 -f 382/411 397/434 398/416 -f 195/217 180/198 194/194 -f 425/451 440/471 441/475 -f 185/203 170/200 184/197 -f 191/202 176/181 190/199 -f 170/200 185/203 186/201 -f 192/189 177/184 191/202 -f 187/191 172/190 186/201 -f 185/203 200/219 201/204 -f 207/209 192/189 206/205 -f 202/211 187/191 201/204 -f 197/212 182/206 196/207 -f 208/225 193/208 207/209 -f 203/227 188/210 202/211 -f 198/229 183/193 197/212 -f 219/237 234/238 235/242 -f 127/142 142/161 143/146 -f 404/422 419/447 420/431 -f 210/234 195/217 209/213 -f 140/155 155/179 156/159 -f 218/233 233/259 234/238 -f 206/205 191/202 205/218 -f 213/239 228/256 229/240 -f 215/243 200/219 214/221 -f 221/223 206/205 220/220 -f 200/219 215/243 216/222 -f 222/226 207/209 221/223 -f 217/228 202/211 216/222 -f 212/230 197/212 211/224 -f 223/231 208/225 222/226 -f 218/249 203/227 217/228 -f 213/239 198/229 212/230 -f 224/235 209/213 223/231 -f 219/237 204/215 218/233 -f 198/229 213/239 214/221 -f 225/241 210/234 224/235 -f 99/106 114/109 115/113 -f 78/103 93/110 94/97 -f 260/284 275/306 276/287 -f 240/262 225/241 239/236 -f 204/215 219/237 220/220 -f 21/15 36/55 37/36 -f 236/246 221/223 235/242 -f 215/243 230/244 231/245 -f 237/248 222/226 236/246 -f 232/250 217/228 231/245 -f 227/251 212/230 226/247 -f 238/252 223/231 237/248 -f 233/254 218/249 232/250 -f 228/256 213/239 227/251 -f 253/258 238/252 252/253 -f 107/119 122/143 123/128 -f 232/250 247/269 248/255 -f 254/263 239/236 253/258 -f 97/118 112/125 113/120 -f 227/251 242/271 243/257 -f 255/280 240/262 254/263 -f 188/196 203/232 204/215 -f 245/283 230/244 244/261 -f 251/266 236/246 250/264 -f 230/244 245/283 246/265 -f 252/253 237/248 251/266 -f 247/269 232/250 246/265 -f 242/271 227/251 241/267 -f 267/273 252/253 266/268 -f 262/289 247/269 261/270 -f 91/100 106/121 107/119 -f 268/276 253/258 267/273 -f 50/53 65/75 66/62 -f 159/154 174/174 175/178 -f 269/281 254/263 268/276 -f 264/295 249/260 263/278 -f 262/289 277/310 278/293 -f 270/297 255/280 269/281 -f 125/139 140/155 141/140 -f 260/284 245/283 259/279 -f 266/268 251/266 265/282 -f 245/283 260/284 261/270 -f 275/306 260/284 274/285 -f 281/288 266/268 280/286 -f 93/110 108/127 109/111 -f 282/292 267/273 281/288 -f 277/310 262/289 276/287 -f 46/58 61/81 62/64 -f 283/294 268/276 282/292 -f 110/135 125/139 126/137 -f 273/301 258/275 272/291 -f 284/298 269/281 283/294 -f 279/299 264/295 278/296 -f 258/275 273/301 274/285 -f 285/303 270/297 284/298 -f 189/214 204/215 205/218 -f 294/322 279/299 293/300 -f 289/307 274/285 288/302 -f 300/325 285/303 299/304 -f 264/295 279/299 280/286 -f 290/327 275/306 289/307 -f 296/309 281/288 295/305 -f 133/145 148/164 149/148 -f 297/313 282/292 296/309 -f 292/318 277/310 291/308 -f 287/315 272/291 286/312 -f 298/316 283/294 297/313 -f 178/188 193/208 194/194 -f 288/302 273/301 287/315 -f 277/310 292/318 293/314 -f 313/335 298/316 312/317 -f 308/337 293/314 307/319 -f 303/339 288/302 302/320 -f 131/138 146/157 147/141 -f 283/294 298/316 299/304 -f 95/114 110/135 111/116 -f 315/345 300/325 314/321 -f 123/128 138/147 139/151 -f 305/328 290/327 304/324 -f 311/329 296/309 310/326 -f 306/330 291/308 305/328 -f 312/317 297/313 311/329 -f 307/319 292/318 306/330 -f 302/320 287/315 301/331 -f 327/336 312/317 326/332 -f 322/338 307/319 321/333 -f 317/340 302/320 316/334 -f 328/354 313/335 327/336 -f 323/356 308/337 322/338 -f 318/357 303/339 317/340 -f 293/300 308/342 309/323 -f 324/360 309/323 323/343 -f 8/26 23/42 24/27 -f 330/362 315/345 329/341 -f 309/323 324/360 325/346 -f 320/347 305/328 319/344 -f 326/332 311/329 325/346 -f 321/333 306/330 320/347 -f 336/350 320/347 335/348 -f 342/351 326/332 341/349 -f 337/371 321/333 336/350 -f 343/355 327/336 342/351 -f 349/377 364/401 365/387 -f 333/358 317/340 332/353 -f 344/359 328/354 343/355 -f 339/376 323/356 338/352 -f 334/366 318/357 333/358 -f 345/363 329/341 344/359 -f 340/364 324/360 339/361 -f 288/302 303/339 304/324 -f 346/368 330/362 345/363 -f 324/360 340/364 341/349 -f 355/385 340/364 354/365 -f 303/339 318/357 319/344 -f 361/388 346/368 360/369 -f 340/364 355/385 356/370 -f 351/372 336/350 350/367 -f 357/391 342/351 356/370 -f 352/392 337/371 351/372 -f 129/149 144/150 145/153 -f 294/322 309/323 310/326 -f 348/382 333/358 347/375 -f 359/378 344/359 358/373 -f 354/380 339/376 353/374 -f 118/123 133/145 134/129 -f 360/369 345/363 359/378 -f 374/384 359/378 373/379 -f 369/400 354/380 368/381 -f 364/401 349/377 363/383 -f 375/389 360/369 374/384 -f 370/404 355/385 369/386 -f 352/392 367/393 368/381 -f 376/407 361/388 375/389 -f 355/385 370/404 371/390 -f 366/410 351/372 365/387 -f 372/394 357/391 371/390 -f 439/467 455/492 456/489 -f 32/45 47/63 48/46 -f 351/372 366/410 367/393 -f 59/51 74/86 75/73 -f 388/399 373/379 387/395 -f 279/299 294/322 295/305 -f 378/417 363/383 377/398 -f 389/403 374/384 388/399 -f 384/420 369/400 383/396 -f 17/24 32/45 33/40 -f 390/408 375/389 389/403 -f 385/423 370/404 384/405 -f 65/75 80/96 81/78 -f 391/426 376/407 390/408 -f 370/404 385/423 386/409 -f 381/413 366/410 380/406 -f 387/395 372/394 386/409 -f 397/434 412/456 413/437 -f 402/415 387/395 401/412 -f 397/434 382/411 396/414 -f 403/419 388/399 402/415 -f 366/410 381/413 382/411 -f 393/421 378/417 392/418 -f 404/422 389/403 403/419 -f 399/440 384/420 398/416 -f 394/428 379/402 393/421 -f 405/427 390/408 404/422 -f 400/432 385/423 399/424 -f 379/402 394/428 395/425 -f 406/430 391/426 405/427 -f 385/423 400/432 401/412 -f 82/80 97/118 98/102 -f 364/401 379/402 380/406 -f 421/452 406/430 420/431 -f 400/432 415/449 416/433 -f 411/435 396/414 410/429 -f 417/436 402/415 416/433 -f 412/456 397/434 411/435 -f 418/439 403/419 417/436 -f 155/179 170/200 171/180 -f 408/441 393/421 407/438 -f 419/447 404/422 418/439 -f 414/443 399/440 413/437 -f 409/445 394/428 408/441 -f 103/105 118/123 119/107 -f 415/449 400/432 414/442 -f 429/466 414/443 428/444 -f 275/306 290/327 291/308 -f 435/453 420/431 434/448 -f 430/469 415/449 429/450 -f 409/445 424/446 425/451 -f 436/472 421/452 435/453 -f 415/449 430/469 431/454 -f 408/441 423/463 424/446 -f 432/457 417/436 431/454 -f 427/461 412/456 426/455 -f 433/459 418/439 432/457 -f 412/456 427/461 428/444 -f 423/463 408/441 422/458 -f 434/448 419/447 433/459 -f 448/465 433/459 447/460 -f 427/461 442/477 443/462 -f 438/481 423/463 437/464 -f 449/468 434/448 448/465 -f 444/484 429/466 443/462 -f 98/108 113/130 114/109 -f 450/473 435/453 449/468 -f 445/487 430/469 444/470 -f 424/446 439/467 440/471 -f 451/490 436/472 450/473 -f 430/469 445/487 446/474 -f 410/429 425/451 426/455 -f 447/460 432/457 446/474 -f 442/477 427/461 441/475 -f 463/479 447/460 462/476 -f 458/498 442/477 457/478 -f 464/483 448/465 463/479 -f 442/477 458/498 459/480 -f 454/485 438/481 453/482 -f 465/502 449/468 464/483 -f 460/504 444/484 459/480 -f 455/492 439/467 454/485 -f 63/68 78/103 79/90 -f 461/495 445/487 460/488 -f 394/428 409/445 410/429 -f 445/487 461/495 462/476 -f 457/478 441/475 456/489 -f 455/492 470/511 471/493 -f 482/509 467/491 481/494 -f 461/495 476/513 477/496 -f 86/79 101/115 102/99 -f 478/499 463/479 477/496 -f 473/514 458/498 472/497 -f 479/503 464/483 478/499 -f 458/498 473/514 474/500 -f 469/505 454/485 468/501 -f 480/512 465/502 479/503 -f 475/510 460/504 474/500 -f 470/511 455/492 469/505 -f 174/174 189/214 190/199 -f 476/513 461/495 475/506 -f 8/21 475/510 7/14 -f 3/23 470/511 2/16 -f 480/512 13/19 14/2 -f 9/5 476/513 8/26 -f 4/8 471/493 3/23 -f 481/494 14/2 15/1 -f 476/513 9/5 10/4 -f 5/7 472/497 4/8 -f 477/496 10/4 11/10 -f 6/11 473/514 5/7 -f 478/499 11/10 12/12 -f 7/14 474/500 6/11 -f 2/16 469/505 1/17 -f 479/503 12/12 13/19 -f 367/393 382/411 383/396 diff --git a/resources/assets/mysticmods/textures/blocks/Thumbs.db b/resources/assets/mysticmods/textures/blocks/Thumbs.db deleted file mode 100644 index 030d271..0000000 Binary files a/resources/assets/mysticmods/textures/blocks/Thumbs.db and /dev/null differ diff --git a/resources/assets/mysticmods/textures/items/Thumbs.db b/resources/assets/mysticmods/textures/items/Thumbs.db deleted file mode 100644 index 602e9a9..0000000 Binary files a/resources/assets/mysticmods/textures/items/Thumbs.db and /dev/null differ diff --git a/resources/assets/mysticmods/textures/misc/Thumbs.db b/resources/assets/mysticmods/textures/misc/Thumbs.db deleted file mode 100644 index dede3d2..0000000 Binary files a/resources/assets/mysticmods/textures/misc/Thumbs.db and /dev/null differ diff --git a/resources/assets/mysticmods/textures/models/Thumbs.db b/resources/assets/mysticmods/textures/models/Thumbs.db deleted file mode 100644 index b89d51b..0000000 Binary files a/resources/assets/mysticmods/textures/models/Thumbs.db and /dev/null differ diff --git a/resources/assets/mysticmods/textures/models/armor/Thumbs.db b/resources/assets/mysticmods/textures/models/armor/Thumbs.db deleted file mode 100644 index 5abbb73..0000000 Binary files a/resources/assets/mysticmods/textures/models/armor/Thumbs.db and /dev/null differ