Posted February 2, 201411 yr Hello, I have a working NBT system that keeps track of its speed and everything. I do not know how I would dynamically change the speed, though. I got it to sort-of work except it changes the speed for all picks of its type, not that specific item stack. Heres that code: public static float getSpeed(ItemStack stack) { if (stack.stackTagCompound != null && AddRuneHandler.getAmount(stack, EnumRuneReqs.efficiency.getId())[0] != -1) { float amount = AddRuneHandler.getAmount(stack, EnumRuneReqs.efficiency.getId())[0]; return (float)((amount + 10) * .5); } else return 4f; } And in the item class in onUpdate() efficiencyOnProperMaterial = Efficiency.getSpeed(stack); How would I change the speed for a specific Item Stack? I do not want to put 30 if statements in the onUpdate class... Thanks
February 2, 201411 yr @Override public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { } ? Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.