From be1a2ad2a1f6ed4c7e3f56dc489d66ea58a2355d Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Mon, 8 Jul 2013 00:56:48 -0500 Subject: [PATCH] Fixes for 1.6 ... way to go new resource system >.> --- common/MysticWorld/Client/FX/LightCubeFX.java | 4 +- common/MysticWorld/Client/FX/PowerAirFX.java | 4 +- .../MysticWorld/Client/FX/PowerEarthFX.java | 4 +- .../MysticWorld/Client/FX/PowerEnergyFX.java | 4 +- common/MysticWorld/Client/FX/PowerFireFX.java | 4 +- .../MysticWorld/Client/FX/PowerWaterFX.java | 4 +- common/MysticWorld/Entity/EntityHandler.java | 6 - common/MysticWorld/Entity/EntityPigman.java | 132 ------------------ .../Items/ItemArmorAdamantine.java | 24 ++-- .../MysticWorld/Items/ItemArmorIridium.java | 18 +-- .../MysticWorld/Items/ItemArmorMithril.java | 18 +-- .../MysticWorld/Items/ItemArmorVerdite.java | 19 +-- 12 files changed, 42 insertions(+), 199 deletions(-) delete mode 100644 common/MysticWorld/Entity/EntityPigman.java diff --git a/common/MysticWorld/Client/FX/LightCubeFX.java b/common/MysticWorld/Client/FX/LightCubeFX.java index 2918f92..b6ec16f 100644 --- a/common/MysticWorld/Client/FX/LightCubeFX.java +++ b/common/MysticWorld/Client/FX/LightCubeFX.java @@ -71,7 +71,7 @@ public class LightCubeFX extends EntityFX { GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/lightCubeFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/lightCubeFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -96,7 +96,7 @@ public class LightCubeFX extends EntityFX { GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(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 8950f53..372666c 100644 --- a/common/MysticWorld/Client/FX/PowerAirFX.java +++ b/common/MysticWorld/Client/FX/PowerAirFX.java @@ -73,7 +73,7 @@ public class PowerAirFX extends EntityFX GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/airFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/airFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -98,7 +98,7 @@ public class PowerAirFX extends EntityFX GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(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 5381633..ad6f8ae 100644 --- a/common/MysticWorld/Client/FX/PowerEarthFX.java +++ b/common/MysticWorld/Client/FX/PowerEarthFX.java @@ -73,7 +73,7 @@ public class PowerEarthFX extends EntityFX GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/earthFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/earthFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -98,7 +98,7 @@ public class PowerEarthFX extends EntityFX GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(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 4a1c32d..3188037 100644 --- a/common/MysticWorld/Client/FX/PowerEnergyFX.java +++ b/common/MysticWorld/Client/FX/PowerEnergyFX.java @@ -73,7 +73,7 @@ public class PowerEnergyFX extends EntityFX GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/energyFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/energyFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -98,7 +98,7 @@ public class PowerEnergyFX extends EntityFX GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(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 365f8e8..c022885 100644 --- a/common/MysticWorld/Client/FX/PowerFireFX.java +++ b/common/MysticWorld/Client/FX/PowerFireFX.java @@ -73,7 +73,7 @@ public class PowerFireFX extends EntityFX GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/fireFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/fireFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -98,7 +98,7 @@ public class PowerFireFX extends EntityFX GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(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 7cc4e22..d40462f 100644 --- a/common/MysticWorld/Client/FX/PowerWaterFX.java +++ b/common/MysticWorld/Client/FX/PowerWaterFX.java @@ -73,7 +73,7 @@ public class PowerWaterFX extends EntityFX GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/MysticTextures/textures/misc/waterFX.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticTextures:textures" + "/misc/waterFX.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); @@ -98,7 +98,7 @@ public class PowerWaterFX extends EntityFX GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/assets/minecraft/textures/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); tessellator.startDrawingQuads(); } } diff --git a/common/MysticWorld/Entity/EntityHandler.java b/common/MysticWorld/Entity/EntityHandler.java index 2a8af25..3771b99 100644 --- a/common/MysticWorld/Entity/EntityHandler.java +++ b/common/MysticWorld/Entity/EntityHandler.java @@ -20,11 +20,5 @@ public class EntityHandler { EntityRegistry.registerModEntity(EntityChargeEarth.class, Strings.ENTITY_EARTH_CHARGE_NAME, EntityIds.ENTITY_EARTH_CHARGE, MysticWorld.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityChargeEnergy.class, Strings.ENTITY_ENERGY_CHARGE_NAME, EntityIds.ENTITY_ENERGY_CHARGE, MysticWorld.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityChargeWater.class, Strings.ENTITY_WATER_CHARGE_NAME, EntityIds.ENTITY_WATER_CHARGE, MysticWorld.instance, 80, 3, false); - - EntityRegistry.registerModEntity(EntityPigman.class, Strings.ENTITY_PIGMAN_NAME, EntityIds.ENTITY_PIGMAN, MysticWorld.instance, 80, 3, false); - - BiomeGenBase[] overworldbiomes = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS.DESERT.MAGICAL.MOUNTAIN.FOREST.HILLS); - - EntityRegistry.addSpawn(EntityPigman.class, 10, 2, 12, EnumCreatureType.creature, overworldbiomes); } } diff --git a/common/MysticWorld/Entity/EntityPigman.java b/common/MysticWorld/Entity/EntityPigman.java deleted file mode 100644 index 4c58be0..0000000 --- a/common/MysticWorld/Entity/EntityPigman.java +++ /dev/null @@ -1,132 +0,0 @@ -package MysticWorld.Entity; - -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.ai.EntityAIControlledByPlayer; -import net.minecraft.entity.ai.EntityAIFollowParent; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMate; -import net.minecraft.entity.ai.EntityAIPanic; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITempt; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.stats.AchievementList; -import net.minecraft.world.World; - -public class EntityPigman extends EntityAnimal -{ - public EntityPigman(World par1World) - { - super(par1World); - this.setSize(0.9F, 0.9F); - this.getNavigator().setAvoidsWater(true); - float f = 0.25F; - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(1, new EntityAIPanic(this, 0.38F)); - this.tasks.addTask(3, new EntityAIMate(this, f)); - this.tasks.addTask(4, new EntityAITempt(this, 0.3F, Item.carrot.itemID, false)); - this.tasks.addTask(5, new EntityAIFollowParent(this, 0.28F)); - this.tasks.addTask(6, new EntityAIWander(this, f)); - this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - } - - - public boolean isAIEnabled() - { - return true; - } - - public int getMaxHealth() - { - return 20; - } - - protected void updateAITasks() - { - super.updateAITasks(); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); - } - - protected String getLivingSound() - { - return "mob.pig.say"; - } - - protected String getHurtSound() - { - return "mob.pig.say"; - } - - protected String getDeathSound() - { - return "mob.pig.death"; - } - - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.pig.step", 0.15F, 1.0F); - } - - protected int getDropItemId() - { - return this.isBurning() ? Item.porkCooked.itemID : Item.porkRaw.itemID; - } - - protected void dropFewItems(boolean par1, int par2) - { - int j = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + par2); - - for (int k = 0; k < j; ++k) - { - if (this.isBurning()) - { - this.dropItem(Item.porkCooked.itemID, 1); - } - else - { - this.dropItem(Item.porkRaw.itemID, 1); - } - } - - - } - - public void onStruckByLightning(EntityLightningBolt par1EntityLightningBolt) - { - if (!this.worldObj.isRemote) - { - EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj); - entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); - this.worldObj.spawnEntityInWorld(entitypigzombie); - this.setDead(); - } - } - - public EntityPigman spawnBabyAnimal(EntityAgeable par1EntityAgeable) - { - return new EntityPigman(this.worldObj); - } - - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return par1ItemStack != null && par1ItemStack.itemID == Item.carrot.itemID; - } - - public EntityAgeable createChild(EntityAgeable par1EntityAgeable) - { - return this.spawnBabyAnimal(par1EntityAgeable); - } -} diff --git a/common/MysticWorld/Items/ItemArmorAdamantine.java b/common/MysticWorld/Items/ItemArmorAdamantine.java index 4c93fba..32063c8 100644 --- a/common/MysticWorld/Items/ItemArmorAdamantine.java +++ b/common/MysticWorld/Items/ItemArmorAdamantine.java @@ -3,6 +3,7 @@ package MysticWorld.Items; 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; @@ -15,12 +16,11 @@ public class ItemArmorAdamantine extends ItemArmor String ArmorFile_2; public ItemArmorAdamantine(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { - super(par1, par2EnumArmorMaterial,par3,par4); this.ArmorType=par4; this.setCreativeTab(MysticWorld.MysticWorldTab); - this.ArmorFile_1 = "/assets/MysticTextures/textures/armor/adamantine_1.png"; - this.ArmorFile_2 = "/assets/MysticTextures/textures/armor/adamantine_2.png"; + this.ArmorFile_1 = "/MysticTextures/textures/armor/adamantine_1.png"; + this.ArmorFile_2 = "/MysticTextures/textures/armor/adamantine_2.png"; } @Override @@ -42,16 +42,10 @@ public class ItemArmorAdamantine extends ItemArmor } } - public String getArmorTextureFile(ItemStack par1){ - if(par1.itemID == ItemHandler$1.adamantineHelmet.itemID||par1.itemID == ItemHandler$1.adamantineChestplate.itemID||par1.itemID == ItemHandler$1.adamantineBoots.itemID) - { - return ArmorFile_1; - } - if(par1.itemID == ItemHandler$1.adamantineLeggings.itemID) - { - return ArmorFile_2; - } - return ArmorFile_2; - - } + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) + { + int suffix = this.armorType == 2 ? 2 : 1; + + return "MysticTextures:textures" + "/models/armor/Adamantine_layer_" + suffix + ".png"; + } } diff --git a/common/MysticWorld/Items/ItemArmorIridium.java b/common/MysticWorld/Items/ItemArmorIridium.java index fc3604f..da04428 100644 --- a/common/MysticWorld/Items/ItemArmorIridium.java +++ b/common/MysticWorld/Items/ItemArmorIridium.java @@ -3,6 +3,7 @@ package MysticWorld.Items; 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; import net.minecraft.item.ItemArmor; @@ -46,17 +47,12 @@ public class ItemArmorIridium extends ItemArmor } } - public String getArmorTextureFile(ItemStack par1){ - if(par1.itemID == ItemHandler$1.iridiumHelmet.itemID||par1.itemID == ItemHandler$1.iridiumChestplate.itemID||par1.itemID == ItemHandler$1.iridiumBoots.itemID) - { - return ArmorFile_1; - } - if(par1.itemID == ItemHandler$1.iridiumLeggings.itemID) - { - return ArmorFile_2; - } - return ArmorFile_2; - } + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) + { + int suffix = this.armorType == 2 ? 2 : 1; + + return "MysticTextures:textures" + "/models/armor/Iridium_layer_" + suffix + ".png"; + } @Override public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) diff --git a/common/MysticWorld/Items/ItemArmorMithril.java b/common/MysticWorld/Items/ItemArmorMithril.java index d8d7921..0ff70e5 100644 --- a/common/MysticWorld/Items/ItemArmorMithril.java +++ b/common/MysticWorld/Items/ItemArmorMithril.java @@ -3,6 +3,7 @@ package MysticWorld.Items; 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; @@ -42,15 +43,10 @@ public class ItemArmorMithril extends ItemArmor } } - public String getArmorTextureFile(ItemStack par1){ - if(par1.itemID == ItemHandler$1.mithrilHelmet.itemID||par1.itemID == ItemHandler$1.mithrilChestplate.itemID||par1.itemID == ItemHandler$1.mithrilBoots.itemID) - { - return ArmorFile_1; - } - if(par1.itemID == ItemHandler$1.mithrilLeggings.itemID) - { - return ArmorFile_2; - } - return ArmorFile_2; - } + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) + { + int suffix = this.armorType == 2 ? 2 : 1; + + return "MysticTextures:textures" + "/models/armor/Mithril_layer_" + suffix + ".png"; + } } diff --git a/common/MysticWorld/Items/ItemArmorVerdite.java b/common/MysticWorld/Items/ItemArmorVerdite.java index ac7f833..e8e55f0 100644 --- a/common/MysticWorld/Items/ItemArmorVerdite.java +++ b/common/MysticWorld/Items/ItemArmorVerdite.java @@ -3,6 +3,7 @@ package MysticWorld.Items; 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; @@ -42,16 +43,10 @@ public class ItemArmorVerdite extends ItemArmor } } - public String getArmorTextureFile(ItemStack par1){ - if(par1.itemID == ItemHandler$1.verditeHelmet.itemID||par1.itemID == ItemHandler$1.verditeChestplate.itemID||par1.itemID == ItemHandler$1.verditeBoots.itemID) - { - return ArmorFile_1; - } - if(par1.itemID == ItemHandler$1.verditeLeggings.itemID) - { - return ArmorFile_2; - } - return ArmorFile_2; - - } + public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) + { + int suffix = this.armorType == 2 ? 2 : 1; + + return "MysticTextures:textures" + "/models/armor/Verdite_layer_" + suffix + ".png"; + } }