Jump to content

brandon3055

Forge Modder
  • Posts

    444
  • Joined

  • Last visited

Everything posted by brandon3055

  1. Thank you that should help a lot!. shadoskill was simply saying that by adding the nbt to the stack in the addInformation method it is called when the player puts their cursor over the item for the first time.
  2. Hey i have recently been having problems with custom arrows myself but was able to figure it out with some help from the wonderful people here. There are a few problems you need to address. -remove "shootingEntity", "canBePickedUp" and "arrowShake" from your custom arrow class. These are all public fields in the EntityArrow class which you are extending. -change "super.onUpdate()" in your "onUpdate()" method to "super.onEntityUpdate()" Im not 100% sure how this works but i believe super.onUpdate() is calling the default onUpdate() method in EntityArrow replacing it with super.onEntityUpdate() skips this and runs onEntityUpdate() in the Entity class. (Im not 100% sure if that's rite as i am new to java) I am not sure if this will fix your "not staying in block" but it may help. My thread http://www.minecraftforge.net/forum/index.php/topic,18676.0.html Edit: I dont know much about rendering but unless you are trying to give your arrow a custom model or something i didnt need to do any custom rendering.
  3. Thanks I lost count of how many times I went over that code but somehow I missed those every time. And thanks for the super.onEntityUpdate() fix it also seems that the custom datawatcher is not needed. I just have one more annoying problem I need to figure out. I have modified the damage code to prevent enderman from teleporting away from the arrow. DamageSource damagesource = null; if (this.shootingEntity == null) { damagesource = DamageSource.causeArrowDamage(this, this); } else { damagesource = DamageSource.causeArrowDamage(this, this.shootingEntity); } if (movingobjectposition.entityHit instanceof EntityEnderman) damagesource = DamageSource.magic; And this works the arrow damages enderman end the enderman doesn't teleporting away but it dose "visually" teleporting for a second then snap back to its original position. I suspect for some reason the endermen is still teleporting client side then the client re syncs with the server. Any idea why this is happening?
  4. I am trying to create a custom arrow for my custom bow but i have run into some problems. At first the arrow was hitting the player when it was was fired. I was able to partially fix this problem buy removing super.onUpdate() from onUpdate() however the arrow still "visually" hits the player which looks terrible. I tried this fix http://www.minecraftforge.net/forum/index.php/topic,16368.msg94429.html#msg94429 but was unsuccessful. This is my custom arrow code as it is now. If anyone can help me fix this problem it would be much appreciated My custom bow is almost the same as the vanilla bow and works fine with the vanilla arrow entity but if you would like to see that code to i would be happy to post it.
  5. Im not sure how to remove a recipe but you can overwrite the with something else e.g. CraftingManager.getInstance().addRecipe(new ItemStack(Blocks.cobblestone), "CCC", " S ", " S ", 'C', Blocks.cobblestone, 'S', Items.stick); This will give you a block of cobble when you try to craft a cobble pick. This may not be the best way to do this.
  6. hmm i guess that works (i am already doing that on some items) but i would like to know if there is a better way...
  7. I have had a bit of a look around but i cant seem to find out how to set default custom nbt data on items. I found a way around this by checking if the tag exists before i try to read from it and if not i create it but this method isn't ideal. I tried adding my tags using the onCreated() method but this method dosnt get called when spawning items using creative or shift clicking from the crafting table. Is there a better way?
  8. Thankyou!!! i have been trying to figure this out for hours. To be honest i dont really know what im doing with some of this im still very new to java and modding but i am learning. And in the future i will start my own topic. Edit: Hmm... i thought it was working... maby i forgot to switch to servival... well guess its time to start a new thread... after i do some more troubleshooting.
  9. Hello i was just wondering if there is an update for this fix for 1.7.2? I tried using your fix and replaced player.username with player.getDisplayName() but it gave me a nullPointExeption when i tryed to spawn the arrow. I found that removing super.onUpdate() from onUpdate() partially fixed the problem (the arrow no longer hits the player) but the arrow still hits the player client side which doesn't affect the player but it looks bad any idea how i can fix this?
×
×
  • Create New...

Important Information

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