Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • GravityWolf

GravityWolf

Members
 View Profile  See their activity
  • Content Count

    98
  • Joined

    July 19, 2013
  • Last visited

    September 30, 2019

Community Reputation

1 Neutral

About GravityWolf

  • Rank
    Stone Miner

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!
  1. GravityWolf

    Telling how long left click is held down

    GravityWolf posted a topic in Modder Support

    Hello! I'm working on a melee/ranged weapon, but I want it so you only have to use left click, as I am using dual wielding. So I'm going to try to set it up so if you hold down left click for about 1 second and let go, it shoots an entity. (Don't worry, I don't need help with that ) So here's my code so far to stop the swing: if (weaponAbility == "chakram") { if (player.isSwingInProgress) { player.isSwingInProgress = false; } } This is in onUpdate, just by the way. So, anyone have any ideas? Thanks!
    • September 25, 2013
    • 2 replies
  2. GravityWolf

    Custom tool- and armorset

    GravityWolf replied to freaki1's topic in Modder Support

    Toolset: http://www.youtube.com/watch?v=kSoSQ5gbmZA Armorset: http://www.youtube.com/watch?v=xgAjEy7kVXA It's not that hard to find them
    • September 15, 2013
    • 6 replies
  3. GravityWolf

    Changing Swing Speed

    GravityWolf replied to GravityWolf's topic in Modder Support

    Got it to work using this: public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; ItemStack equipped = player.getCurrentEquippedItem(); if(equipped == stack) { if(player.isSwingInProgress) { if(swingSpeed == 0) { } else if (swingSpeed == 1) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 0)); } else if (swingSpeed == 2) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 1)); } else if (swingSpeed == 3) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 2)); } else if (swingSpeed == -1) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 0)); } else if (swingSpeed == -2) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); } else if (swingSpeed == -3) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 2)); } else if (swingSpeed == -4) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 3)); } } } } } SwingSpeed is my own custom variable, just btw
    • September 15, 2013
    • 8 replies
  4. GravityWolf

    EnumAction won't work

    GravityWolf replied to GravityWolf's topic in Modder Support

    It worked! Thanks! And I didn't know you moved here from MCForums
    • September 15, 2013
    • 5 replies
  5. GravityWolf

    EnumAction won't work

    GravityWolf replied to GravityWolf's topic in Modder Support

    I can't figure this out...here's my code: public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.block; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; } It does nothing on right click...
    • September 15, 2013
    • 5 replies
  6. GravityWolf

    EnumAction won't work

    GravityWolf posted a topic in Modder Support

    Hello! I know this is a very noob question, but getEnumAction() doesn't work...it doesn't do the action I set it to do. Here is my code: package MysticRealms.Items; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.EnumAction; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; import MysticRealms.MysticRealms; public class ItemWeapon extends Item { int swingSpeed; public ItemWeapon(int id, EnumToolMaterial material, int speed, String name /*String ability*/) { super(id); this.setCreativeTab(MysticRealms.mysticTab); this.setUnlocalizedName(name); swingSpeed = speed; } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; ItemStack equipped = player.getCurrentEquippedItem(); if(equipped == stack) { if(swingSpeed == 0) { } else if (swingSpeed == 1) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 0)); } else if (swingSpeed == 2) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 1)); } else if (swingSpeed == 3) { player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 2)); } else if (swingSpeed == -1) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 0)); } else if (swingSpeed == -2) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); } else if (swingSpeed == -3) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 2)); } else if (swingSpeed == -4) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 3)); } } } } public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.block; } } Thanks!
    • September 14, 2013
    • 5 replies
  7. GravityWolf

    Changing Swing Speed

    GravityWolf replied to GravityWolf's topic in Modder Support

    I will use that when that comes out, but for now I think I can utilize the haste effect code.
    • September 14, 2013
    • 8 replies
  8. GravityWolf

    Changing Swing Speed

    GravityWolf replied to GravityWolf's topic in Modder Support

    I would do that, but it swings too fast too quickly. What I mean is Haste 1 gives you increased swing speed, but Haste 2 gives you almost double speed of Haste 1. I'm looking for sword swing speed.
    • September 13, 2013
    • 8 replies
  9. GravityWolf

    Changing Swing Speed

    GravityWolf replied to GravityWolf's topic in Modder Support

    Hope this doesn't count as spam, but I think I made some progress: I found this: if (this.isPotionActive(Potion.digSpeed)) { f *= 1.0F + (float)(this.getActivePotionEffect(Potion.digSpeed).getAmplifier() + 1) * 0.2F; } and this: private int getArmSwingAnimationEnd() { return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6); } I think these are important, the second one probably more so. They seem to require potion effects, and like I said in the OP, I don't really want to use potion effects. If you have any ideas, let me know! Thanks! ~GravityWolf
    • September 13, 2013
    • 8 replies
  10. GravityWolf

    Changing Swing Speed

    GravityWolf posted a topic in Modder Support

    This is my third time doing this, and I hope I get a response this time So, basically, I want it so I could change the swing speed, like if you were using a Haste potion effect. (I don't want to do that though, it doesn't give me enough speed options that way) I tried looking in the Potions class, and I found public static final Potion digSpeed = (new Potion(3, false, 14270531)).setPotionName("potion.digSpeed").setIconIndex(2, 0).setEffectiveness(1.5D); There was nothing else in the code about it, so I took it that 142703531 had something to do with it. If you know anything about it, or have any ideas on it, it would be great if you could let me know! Thanks! ~GravityWolf
    • September 13, 2013
    • 8 replies
  11. GravityWolf

    Removing Crafting Table and Adding new armor slots

    GravityWolf replied to GravityWolf's topic in Modder Support

    That could work...
    • September 6, 2013
    • 2 replies
  12. GravityWolf

    Removing Crafting Table and Adding new armor slots

    GravityWolf posted a topic in Modder Support

    Hello! I'm trying to make an RPG-ish mod, and I need to find a way to add new armor slots and remove the crafting table in the inventory. Here is a picture of what I have in mind: So, what I need to do is, like I said, remove the crafting table and add new armors slots. Anyone have any ideas? Obviously remove the crafting table from the inventory first
    • September 5, 2013
    • 2 replies
  13. GravityWolf

    Changing Swing Speed

    GravityWolf posted a topic in Modder Support

    Hello! I need help with increasing a player's swing speed. Basically, when you click with a certain item, the swing is faster. Anyone know how to do this? This is quite important. Thanks!
    • August 21, 2013
  14. GravityWolf

    Open Vanilla GUI w/ item right click?

    GravityWolf replied to GravityWolf's topic in Modder Support

    Thanks, it brings up the GUI, but now I have another problem =/ When I click on the item, it moves right back to the slot it was on previously. Any ideas?
    • August 20, 2013
    • 16 replies
  15. GravityWolf

    Open Vanilla GUI w/ item right click?

    GravityWolf replied to GravityWolf's topic in Modder Support

    onItemUse is just when you right click a block with an item, so that's not really what I want. I am using onItemRightClick, but onItemUse did work when I tried it. Just wasn't right, though.
    • August 20, 2013
    • 16 replies
  • All Activity
  • Home
  • GravityWolf
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community