Jump to content

FlashBash21

Forge Modder
  • Posts

    32
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    Novice modder and bad with the laddies.

FlashBash21's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for all the help, I was able to fix it. The file was corrupted or something so I just re-downloaded it. It's all good.
  2. Still no source code after running it.
  3. No, I did not. I assume I run this in the command prompt inside my mod folder?
  4. Nope, everything seemed to be successful.
  5. I'm positive I used setupDecompWorkspace, when I go under forgeSrc I don't get any source code, I do get assets, however.
  6. After setting up my main mod file I am completely lost. I have no idea where to start or what to do. The code seems to have changed a ton(Y DO U HAVE TO CHANGE SO OFTEN). And to make it all better I can't find the source code for vanilla minecraft... yay *cries*. But in all seriousness, I need somewhere to get started, so anything that gives examples of the new code and can somewhat explain it or make it clear as to what it does or is used for would be fabuloooooooooous! Thanks.
  7. Ok so I got the charge to show up so thanks! But how do I update the NBT(I'm testing it with the onItemRightClick method)? I'm guessing I should use the onUpdate method or is there something to do that for me? And if I use onUpdate what do I put in it? here is my class : package com.LegendsAndArtifacts.items; import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; public class AxeInfernal extends ItemSword{ private boolean isCharged = false; private int itemCharge = 0; public AxeInfernal(ToolMaterial p_i45356_1_) { super(p_i45356_1_); } @Override public void onCreated(ItemStack stack, World world, EntityPlayer player) { stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("currentCharge", itemCharge); } public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { if (stack.stackTagCompound != null) { int charge = stack.stackTagCompound.getInteger("currentCharge"); list.add("Current Charge: " + charge); } } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { //? } public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ itemCharge++; return stack; } } I think that using itemCharge++ is probably the wrong way to increment it but I'm not sure what the right way is. Again thanks for any help that you might give!
  8. PLEASE NOT THAT I'M NEW TO NBT'S AND AM STILL LEARNING IT! Hello! I'm currently attempting to use an NBT to store information in an item I'm using. I want to the item to store a charge in it every time you hit a mob, so for that I'm gonna use an NBT. I want the the charge of the item to be displayed in the lore of the item but it doesn't show up(note that It doesn't store charges when you hit mobs yet I'm adding that later). I don't know much about NBT's so I've found some tutorials but they aren't too great or don't explain NBT's for items. Any help or advice at all would be well appreciated, Thanks! Here is my class: package com.LegendsAndArtifacts.items; import java.util.List; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; public class AxeInfernal extends ItemSword{ boolean isCharged = false; int itemCharge = 0; public AxeInfernal(ToolMaterial p_i45356_1_) { super(p_i45356_1_); } @Override public void onCreated(ItemStack stack, World world, EntityPlayer player) { stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("currentCharge", itemCharge); } public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { if (stack.stackTagCompound != null) { int charge = stack.stackTagCompound.getInteger("currentCharge"); list.add("Current Charge: " + charge); } } }
  9. Never mind I fixed it! I had the wrong import so instead of using java.util.list I was using java.awt.list. If you are having trouble with this hopefully this will help amd sorry for wasting anyone's time.
  10. I'm not sure what I did wrong here, but I'm using the addInformation method to add lore to my items. Here is my item class AxeInfernal: http://pastebin.com/RHPYv80s, for some reason the button to insert hyperlinks isn't working so sorry about that. If needed here is my main class, http://pastebin.com/inJawuNw. I'm still learning the ropes of forge so any help at all would be appreciated!
  11. I did this and it fixed the problem with the projectile turning black at certain angles. But I know little to none about tesselators(and OpenGL, in case its important right here), so when I added the arguments it told me to add, I didn't know what to put in there. here is the what I have in the tesselator float f4 = 1.0F; float f5 = 0.5F; float f6 = 0.25F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, p4, p4); tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, p4, p4); tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, p4, p4); tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, p4, p4); tessellator.draw(); It added the two p4's at the end and I don't know what to replace that with. Also the consol was telling me that my texture path was wrong so I changed it from Constants.MODID, ":textures/entity/magic_Pro.png" to Constants.MODID, "textures/entity/magic_Pro.png" the texture path fixed and now the projectile blinks(flashes from purple to a darker purple, which are two colors of my projectile texture). Also thanks for spending your time helping me with this.
  12. http://pastebin.com/VCrB98DY
  13. So I removed all things IIcon from my render class, and then I put the internals func_77026_a into doRender(I don't know if your supposed to do that, when I removed the IIcon the entity wouldn't appear at all so I put it in doRender) and it appeared, but whenever I face a certain direction it would turn black, and the other directions it would be black.
  14. I'm pretty new IIcon. What do the U and V coordinates and what can I do about them?
  15. I've been trying all I can, I'm really confused and I need help with this.
×
×
  • Create New...

Important Information

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