
ModderInTraining
Members-
Posts
22 -
Joined
-
Last visited
Everything posted by ModderInTraining
-
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Does any one have a good source for me to use to better learn java? -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Im using this, (code inside the proper brackets) but its still not firing -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Im doing this in the ItemModArmor Class -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Since your all such experienced programmers, how would you do this. -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
I have a basic knowledge of Java, but it is very basic and limited -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Still no success. Im bad at this. -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
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.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Can someone explain why this isnt working? -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
My code for checking the armor is working fine, the item in hand is where im struggling. -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
I tried this but it doesnt seem to accept boolean. -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
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.
ModderInTraining replied to ModderInTraining's topic in Modder Support
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.
ModderInTraining replied to ModderInTraining's topic in Modder Support
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.
ModderInTraining replied to ModderInTraining's topic in Modder Support
Where should I put this? -
Give achievement based on item in hand.
ModderInTraining replied to ModderInTraining's topic in Modder Support
How should I go about fixing this? Change ItemStack instances to Item instances? -
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); } } }
-
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
ModderInTraining replied to ModderInTraining's topic in Modder Support
Ive gotten it to work finally. Thank you to all who have helped. -
Initializing game java.lang.NullPointerException
ModderInTraining replied to ModderInTraining's topic in Modder Support
Here are those files http://pastebin.com/r6gcJ7wT r6gcJ7wT.txt -
Initializing game java.lang.NullPointerException
ModderInTraining replied to ModderInTraining's topic in Modder Support
here is the file for that but i cant identify the issue RecipeHandler.java -
Please Help: crash report attached below. crash-2017-03-11_13.51.45-client.txt