Everything posted by Mightydanp
-
Cool down not working afte4 changing
You mean tinkers.conf
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
so i am sepost to do something like this? if (nbtDataCompund == null) { // do something? } im just confused right now
-
Cool down not working afte4 changing
after i got a new hard drive reinstalled , i start crashing .. this wasn't happening before this. code http://pastebin.com/H74hDjeC
-
Cool down not working afte4 changing
No ? They just started after ?
-
Cool down not working afte4 changing
na not asking for any help on that stuff just telling them what happenen
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
Im runing into a big problem with my eclipse and java not working
-
Cool down not working afte4 changing
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.
-
Cool down not working afte4 changing
what ? you just confused me
-
Cool down not working afte4 changing
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?
-
Cool down not working afte4 changing
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.
-
Cool down not working afte4 changing
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 ?
-
Cool down not working afte4 changing
Its not crashing as o sead its not working meaning its not changing anything after i changed nbtDataCompund = itemStack.stackTagCompound(); to nbtDataCompund = itemStack.getTagCompound();
-
Cool down not working afte4 changing
Not going to argue with you
-
Cool down not working afte4 changing
dude ? you going to reply
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
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();
-
Cool down not working afte4 changing
your talking about this ? if (!world.isRemote){ NBTTagCompound nbtDataCompund = itemStack.stackTagCompound; if (nbtDataCompund == null) { itemStack.stackTagCompound = new NBTTagCompound(); nbtDataCompund = itemStack.getTagCompound(); }
-
Cool down not working afte4 changing
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; }
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
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
-
Cool down not working afte4 changing
ernio i am getting a dead code in 1.7.10 in this if(data== null){ itemStack.stackTagCompound = new NBTTagCompound(); data= itemStack.stackTagCompound; }
-
Cool down not working afte4 changing
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 ?
IPS spam blocked by CleanTalk.