Everything posted by HappyKiller1O1
-
[1.7.10] Why does a stack's NBTTagCompound return null?
I actually already created something like that. I took your last post as I should not be using the onCreated method and instead, make a separate one to handle it.
-
[1.7.10] Why does a stack's NBTTagCompound return null?
Hm, how would I go about wrapping access to it? Again, still a bit of a learner when it comes to NBT.
-
[1.7.10] Why does a stack's NBTTagCompound return null?
So, I think I've figured out my problem and, this seems to be an error with forge. When I shift click an item out of the crafting result slot, it runs the on created two times on both client and server. But, when just grabbing it out, it creates it once. I'm not sure if this is fixed in later forge versions but, it should be fixed ASAP considering this will be a big damper to my mod that requires the setting of an NBTTagCompound with onCreated.
-
[1.7.10] Duplicate paths in Eclipse
This is by far, the weirdest error I have ever seen. I was creating a hammer called "CrewHammer" (That's what the item class was called) and, the onCreated method in that class was getting called twice. So, I deleted that class to see if I accidentally used it to define another Item and, this happened: Each path for an error was met with another path by eclipse to the folder on my computer. This glitch seems to be duplicating the item making it impossible to set NBT. The duplicate path says "org.eclipse.jdt.core.external.folders/[my file path to the class with the error]". Has anyone gotten this error before and knows how to go about fixing it?
-
[1.7.10] Why does a stack's NBTTagCompound return null?
Ok this is really weird, so I deleted the class to see what errors it gives me and, it should only give three considering the class is only used in three places and, it gave me six. It seems like eclipse is duplicating the paths somehow: Basically it says "org.eclipse.jdt.core.external.folders/src/main/java/com/happykiller/crewmod" which is my main directory... How is this possible??
-
[1.7.10] Why does a stack's NBTTagCompound return null?
After updating to 1388, it still seems to run twice. I can try it with another Item to see if it's an error with forge?
-
[1.7.10] Odd glitch encountered when changing item damage value
KeyHandlers are ALWAYS client side. I think you'd need to send an update packet to the server to update the damage then, update the client. The reason it goes to 35 like it never edited it is because the client is the only object that is changed rather than the variables on the server. Erino would be able to tell you more about how to fix it because he helped me with close to the same problem.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
I think my hammer might work a bit differently than yours.
-
[1.7.10] Odd glitch encountered when changing item damage value
I'm pretty sure you're only updating the display damage (client side) when you need to update the actual damage (server side)
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Sorry about that! Didn't realize it needed that to work. Glad you figured it out!
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
No problem! Just remember, when creating code - think like the code is a person you are talking to.
-
[Forge 1.8] How to make a player right click his sword?
May I ask why exactly you would want the player to block his sword when at level 100? Just curious.
-
[1.7.10] Can't update forge
Derp! That worked, thanks!
-
[1.7.10] Can't update forge
This is what I put there: version = "1.7.10-10.13.3.1388"
-
[1.7.10] Can't update forge
Ok so, I am trying to update my forge version from 10.13.2.1291 to 10.13.3.1388 but, I keep getting an error that directs me to line 25 in the build.gradle file. It says it is an invalid forge version yet it isn't. Can someone help me?
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Just redo your setup with a video from MrCrayFish or something of the sort. If you give up you shouldn't of started at all.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Draco is right, I didn't even notice it but, you have to set your item equal to the class for the item or anything in that class won't be called. You can't just make a class for an item and not initialize your item variable with it.
-
[1.7.10] Why does a stack's NBTTagCompound return null?
I'm trying to override it now. I will update my workspace. I know it sets the NBT Compound but I can't retrieve it correctly... in 1.8, you can retrieve the compound that was set from the onBlockDestroyed?
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Ok, seriously you need to learn how to program Minecraft mods. Why do you initialize your item in your item class? You have to initialize it under the preInit in your main mod file. Please watch some Minecraft Modding tutorials before posting problems like this.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
I tested it completely and it worked just fine. Please post your crafting class, where you initialize your item and, the IronFile class. I will look through it and see what you did wrong. Never give up when a problem arises; if you do, why are you programming? Life is full of problems that need to be solved in order to move on.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
No no no no. Remove the ".setContainerItem(iFile)" from your initiation of the Item. Then, the the IronFile item class, put what I showed above to set the container item. After that, registered your shapeless crafting recipe like this: GameRegistry.addShapelessRecipe(new ItemStack(IronRod.iRod, 4), new ItemStack(IronPlate.iPlate, 1), new ItemStack(IronFile.iFile, 1)); This is not meant to be a Java school. I do not like taking people step by step on how to fix their problem so, I encourage you to look harder at your problems and try to fix them yourself.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Just remove the third param in the IronFile Itemstack you created. There is no need to set the metadata to that.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
So, I just tested this and it worked. Put this in your item: //Makes it so the item stays in the crafting grid public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) { return false; } //Tells the game your item has a container item public boolean hasContainerItem() { return true; } //Sets teh container item public ItemStack getContainerItem(ItemStack itemStack) { itemStack.attemptDamageItem(1, itemRand); return itemStack; } I registered my crafting recipe like so: GameRegistry.addRecipe(new ItemStack(Items.stick, 1), "C ", "S ", "S ", 'C', CrewMod.crewHammer, 'S', Items.stick); It should work with shapeless recipes also. EDIT: There is no need for you to use the WILDCARDVALUE param in the IronFile recipe you registered. Make sure to remove that.
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
Oh I didn't see your recipe under it, my mistake! Why are you using OreDictionary.WILD_CARD_VALUE?
-
[1.7.10] [SOLVED] How do i add durable items to my crafting recipes???
You do know, you are trying to return your IronFile as a result of the crafting, correct? getContainerItem only refers to the item if it is being used to craft the item. I believe ScratchForFun made a battery video that easily made the crafting result be damaged if that is what you want to do.
IPS spam blocked by CleanTalk.