Everything posted by ModderInTraining
-
Give achievement based on item in hand.
Does any one have a good source for me to use to better learn java?
-
Give achievement based on item in hand.
Im using this, (code inside the proper brackets) but its still not firing
-
Give achievement based on item in hand.
Im doing this in the ItemModArmor Class
-
Give achievement based on item in hand.
Since your all such experienced programmers, how would you do this.
-
Give achievement based on item in hand.
I have a basic knowledge of Java, but it is very basic and limited
-
Give achievement based on item in hand.
Still no success. Im bad at this.
-
Give achievement based on item in hand.
So am i closing it too early? Should I move the brackets to after I add the achievement?
-
Give achievement based on item in hand.
Can someone explain why this isnt working?
-
Give achievement based on item in hand.
My code for checking the armor is working fine, the item in hand is where im struggling.
-
Give achievement based on item in hand.
I tried this but it doesnt seem to accept boolean.
-
Give achievement based on item in hand.
This is the only way I can figure of doing it, how would you suggest I do it?
-
Give achievement based on item in hand.
Would this work? public void onTick(World world, EntityPlayer player, ItemStack itemStack) { int TitaniumArmorPeices = 0; if(player.getArmorInventoryList() != null) { Iterator<ItemStack> iterator = player.getArmorInventoryList().iterator(); while(iterator.hasNext()) { ItemStack stack = iterator.next(); if(stack != null) { if(stack.getItem() instanceof ItemModArmor) { ItemModArmor item = (ItemModArmor) stack.getItem(); if(item.getArmorMaterial() == ModArmor.TitaniumMaterial) { TitaniumArmorPeices++; continue; } } } } } if(TitaniumArmorPeices == 4) { ItemStack getItem = player.getHeldItemMainhand(); ItemStack getItem1 = player.getHeldItemOffhand(); if(player.getHeldItemMainhand() != null) { boolean iterator = player.getHeldItemMainhand().equals(ModCombat.titaniumSword); while (player.getHeldItemOffhand() != null) { boolean iterator1 = player.getHeldItemOffhand().equals(ModCombat.titaniumShield); { continue; } } } } if(player.hasAchievement(AchievementHandler.achievementBulletProof)) { if(!player.hasAchievement(AchievementHandler.achievementBattleReady)) { player.addStat(AchievementHandler.achievementBattleReady); } } }
-
Give achievement based on item in hand.
I havent been modding very long, and dont know very much. What is invoking, and how do you do it?
-
Give achievement based on item in hand.
Where should I put this?
-
Give achievement based on item in hand.
How should I go about fixing this? Change ItemStack instances to Item instances?
-
Give achievement based on item in hand.
I have coded an achievement for wearing specific armor while holding a specific item in each hand. I have the coded it but I do not know how to figure out what isnt working, or why it isnt working. My code: public void onTick(World world, EntityPlayer player, ItemStack itemStack) { int TitaniumArmorPeices = 0; if(player.getArmorInventoryList() != null) { Iterator<ItemStack> iterator = player.getArmorInventoryList().iterator(); while(iterator.hasNext()) { ItemStack stack = iterator.next(); if(stack != null) { if(stack.getItem() instanceof ItemModArmor) { ItemModArmor item = (ItemModArmor) stack.getItem(); if(item.getArmorMaterial() == ModArmor.TitaniumMaterial) { TitaniumArmorPeices++; continue; } } } } } if(TitaniumArmorPeices == 4) { if(player.getHeldItemMainhand() != null) { boolean iterator = player.getHeldItemMainhand().equals(ModCombat.titaniumSword); while (player.getHeldItemOffhand() != null) { boolean iterator1 = player.getHeldItemOffhand().equals(ModCombat.titaniumShield); { continue; } } } } if(player.hasAchievement(AchievementHandler.achievementBulletProof)) { if(!player.hasAchievement(AchievementHandler.achievementBattleReady)) { player.addStat(AchievementHandler.achievementBattleReady); } } }
-
LivingDeathEvent not firing
How do you check the item in hand? i am trying to make an achievement that requires you to be holding two specific items while wearing certain armor. I have figured out the armor portion.
-
Initializing game java.lang.NullPointerException
Ive gotten it to work finally. Thank you to all who have helped.
-
Initializing game java.lang.NullPointerException
Here are those files http://pastebin.com/r6gcJ7wT r6gcJ7wT.txt
-
Initializing game java.lang.NullPointerException
here is the file for that but i cant identify the issue RecipeHandler.java
-
Initializing game java.lang.NullPointerException
Please Help: crash report attached below. crash-2017-03-11_13.51.45-client.txt
IPS spam blocked by CleanTalk.