Jump to content

Mightydanp

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Mightydanp

  1. You mean tinkers.conf
  2. yes i do know what i am doing with the getItemDamage() and such, i do have a quistion, after a built my jar, put some of the class files like this basicly the class files are out of the com folder... when i started it up with regurlar client forge and opened my inventory it crashed with This doesn't make any sense! this is the code that says its crashing public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new TabRegistry()); } am i doing something wrong in my code to cause this or? glaticraft does the same thing in there class https://github.com/micdoodle8/Galacticraft/blob/master/src/main/java/micdoodle8/mods/galacticraft/core/proxy/ClientProxyCore.java
  3. so i am sepost to do something like this? if (nbtDataCompund == null) { // do something? } im just confused right now
  4. after i got a new hard drive reinstalled , i start crashing .. this wasn't happening before this. code http://pastebin.com/H74hDjeC
  5. No ? They just started after ?
  6. na not asking for any help on that stuff just telling them what happenen
  7. Its not java or anything my computer os litarly crashing hard core so im having to do a system restore if that dont work then a clean whip
  8. Im runing into a big problem with my eclipse and java not working
  9. thats not what im talking about.... i asked is there a limit on how much metadata you can use ? for example can i have a item with 1000 metadatas? its a yes or no quistion >.> but you responed with It's a full short, so 0-Short.MAX_VALUE.
  10. what ? you just confused me
  11. ok so heres a good question for later is there a limit on how much metadata you can use ? for example can i have a item with 1000 metadatas?
  12. the reason i'm not making it gain damage with 1 is because i want it to lose damage because the bar on the bottom of the item represents how much is left and thanks for the help i got it to work.
  13. true i did not see it , so you said i have to set it ? i tried to set it with nbtDataCompund.setInteger("coolDown", 0); is that right ?
  14. Its not crashing as o sead its not working meaning its not changing anything after i changed nbtDataCompund = itemStack.stackTagCompound(); to nbtDataCompund = itemStack.getTagCompound();
  15. Not going to argue with you
  16. dude ? you going to reply
  17. im still having the issue where the cooldown still isnt working @Override public void onUpdate(ItemStack itemStack, World world, Entity entity, int i, boolean flag){ super.onUpdate(itemStack, world, entity, i, flag); if (!world.isRemote){ NBTTagCompound nbtDataCompund = itemStack.stackTagCompound; if (nbtDataCompund == null) { itemStack.stackTagCompound = new NBTTagCompound(); nbtDataCompund = itemStack.getTagCompound(); } int coolDown = nbtDataCompund.getInteger("coolDown"); if(coolDown > 0){ --coolDown; nbtDataCompund.setInteger("coolDown", coolDown); } } } @Override public boolean itemInteractionForEntity(ItemStack itemStack, EntityPlayer entityplayer, EntityLivingBase entity ){ int coolDown = itemStack.stackTagCompound.getInteger("coolDown"); if(coolDown > 0){ return false; } if(coolDown == 0){ if (entity instanceof EntityMob){ if(itemStack.getItemDamage() > 0){ entity.setHealth(0.0F); if(!entity.worldObj.isRemote){ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY +"Soul Absurbed!")); } itemStack.damageItem(-1, entityplayer); return true; }else{ if(!entity.worldObj.isRemote){ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "The Magical Stone seems to be full?")); entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "It seems to be useless now.")); entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "I wonder whats inside?")); } return true; } }else{ if(!entity.worldObj.isRemote){ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "Why has this stoped working?")); } } } itemStack.stackTagCompound.setInteger("coolDown", 180);; return false; } im not trying to copy past but for most people they know nothing about tagCompounds and id rather you yell as me and tell me what im doing wrong and learn it then trying to figure it out myself
  18. you told me to change itemStack.stackTagCompound to something that can go and get the stack compound so i looked thow there was only stacktagcompound and getstacktagcompound... so on this line nbtDataCompund = itemStack.stackTagCompound(); i changed it to nbtDataCompund = itemStack.getTagCompound();
  19. your talking about this ? if (!world.isRemote){ NBTTagCompound nbtDataCompund = itemStack.stackTagCompound; if (nbtDataCompund == null) { itemStack.stackTagCompound = new NBTTagCompound(); nbtDataCompund = itemStack.getTagCompound(); }
  20. i looked up who helped me and it was you who helped me with this.. http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/1437156-i-need-help-with-a-iteminteractionforentity @Override public boolean itemInteractionForEntity(ItemStack itemStack, EntityPlayer entityplayer, EntityLivingBase entity ){ if(!entity.worldObj.isRemote){ return false; } int coolDown = itemStack.stackTagCompound.getInteger("coolDown"); if(coolDown > 0){ return false; } if(coolDown == 0){ if (entity instanceof EntityMob){ if(itemStack.getItemDamage() > 0){ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY +"Soul Absurbed!")); itemStack.damageItem(-1, entityplayer); entity.setHealth(0.0F); return true; }else{ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "The Magical Stone seems to be full?")); entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "It seems to be useless now.")); entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "I wonder whats inside?")); return true; } }else{ entityplayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GRAY + "Why has this stoped working?")); } } itemStack.stackTagCompound.setInteger("coolDown", 180);; return false; }
  21. ernio posted this i am telling him that there is a dead line in it... as he said "" This code will try to decrement cooldown to zero whenever it's positive (positive = item has cooldown). It also has lazy initialization and will work like charm (mind I wrote it here and am on 1.8, so might made mistake). "" seeing that he just wrote it on here and not cheeking if it works via forge i know that there is something wrong so i am telling him about it..... for the mysterious stone i wrote that maybe maybe 7 or 8 months ago i have no clue what i was thinking but it worked before i changed it to a metadata class so i was seeing if there was a reason it stopped working on me
  22. For NBTTagCompound nbtTagCompound = new NBTTagCompound(); if(nbtTagCompound == null) { // dead code - how can it be null when you just initialized it??? it can't. } i was telling him that i is dead code that his version for 1.8 doesn't work for 1.7.10, that's why i said ernio..... and i realize the nbt portion and im fiddling with it right now
  23. and i seem to be having a small issue for some reason client side it is killing the mobs but server side it doesnt do anything at all to the server they are still alive and can hit me which puzzles me. http://pastebin.com/dXcbmafB
  24. ernio i am getting a dead code in 1.7.10 in this if(data== null){ itemStack.stackTagCompound = new NBTTagCompound(); data= itemStack.stackTagCompound; }
  25. What other ways could i do this ? You sead if i wanted to make it visable to use in my addinformation i would have to do something else then what you put on it ?
×
×
  • Create New...

Important Information

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