Jump to content

ZacDoesStuff

Forge Modder
  • Posts

    17
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

ZacDoesStuff's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi, I've seen mods that have boots that turn water into ice on contact, and have been having trouble on finding out exactly how they did that. More specifically, I want to create skates... What is the code needed for detecting a block in armour?
  2. It's still not working: public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { ItemStack boots = player.getCurrentArmor(0); ItemStack legs = player.getCurrentArmor(1); ItemStack chest = player.getCurrentArmor(2); ItemStack helm = player.getCurrentArmor(3); // legs = 1, chest = 2, helm = 3 if (!world.isRemote){ if (boots != null && boots.getItem() == CanadianMod.skates && legs != null && legs.getItem() == CanadianMod.hockeyPants && chest != null && chest.getItem() == CanadianMod.hockeyChest && helm != null && helm.getItem() == CanadianMod.hockeyHelmet && world.getBlockId((int)player.posX, (int)player.posY-1, (int)player.posZ) == Block.ice.blockID){ player.motionX *= 1.1D; player.motionZ *= 1.1D; } } }
  3. The problem isn't in the motion.x, that works fine without looking for a block. The problem itself is looking for a block
  4. Here you go, keep in mind I'm in 1.6.4 public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { super.onArmorTickUpdate(world, player, itemStack); ItemStack boots = player.getCurrentArmor(0); ItemStack legs = player.getCurrentArmor(1); ItemStack chest = player.getCurrentArmor(2); ItemStack helm = player.getCurrentArmor(3); // legs = 1, chest = 2, helm = 3 if (boots != null && boots.getItem() == CanadianMod.skates && legs != null && legs.getItem() == CanadianMod.hockeyPants && chest != null && chest.getItem() == CanadianMod.hockeyChest && helm != null && helm.getItem() == CanadianMod.hockeyHelmet && world.getBlockId((int)player.posX, (int)player.posY, (int)player.posZ) == Block.ice.blockID){ player.motionX *= 1.1D; player.motionZ *= 1.1D; }} The player.motionX and Z will change to probably a speed potion effect when on ice, since currently that has some weird effects when on ice
  5. Changed it, still doesn't work...
  6. Woops, forgot to change that. Put I already had tried that before asking on the forums When I was asked for the code I just quickly put it back in
  7. public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { super.onArmorTickUpdate(world, player, itemStack); ItemStack boots = player.getCurrentArmor(0); ItemStack legs = player.getCurrentArmor(1); ItemStack chest = player.getCurrentArmor(2); ItemStack helm = player.getCurrentArmor(3); // legs = 1, chest = 2, helm = 3 if (boots != null && boots.getItem() == CanadianMod.skates && legs != null && legs.getItem() == CanadianMod.hockeyPants && chest != null && chest.getItem() == CanadianMod.hockeyChest && helm != null && helm.getItem() == CanadianMod.hockeyHelmet && world.getBlockId((int)player.posX, (int)player.posX, (int)player.posX) == Block.ice.blockID){ player.motionX *= 1.1D; player.motionZ *= 1.1D; } }
  8. I tried that, it didn't do anything
  9. Alright, the method I have is public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack), but I want it to also check for a block that the player is on, so I'm using world.getBlockID(par2, par3, par4), but how do I correctly add the par2, par3, par4 into the method?
  10. It's saying .getEquimentInSlot does not exist
  11. Within my armour class, how would I test for the player wearing a full set of armour? I have this: public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { int i = EntityLiving.getArmorPosition(itemStack) - 1; ItemStack itemstack1 = player.getCurrentArmor(i); if (itemstack1.itemID != CanadianMod.skates.itemID... But that seems to only be returning one time at a time. Suggestions would be great!
  12. Where would I do all this? In the armour class? I tried this public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack, int par2, int par3, int par4) { if (itemStack.itemID == CanadianMod.skates.itemID && (world.getBlockId(par2, par3-1, par4) == Block.ice.blockID)){ Block.ice.slipperiness = 0.00F; } } But that was before i knew where to start, I kind of just guessed...
  13. Hi! I've created an armour for my mod where the boots are skates. My plan is to have the skates allow you to walk on ice like it's a normal block, or even "skate" on it faster, but I have no idea where to start to tackle this. Any suggestions would be great! Thanks, ZacDoesStuff
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.