
Deadlyapples
Members-
Posts
66 -
Joined
-
Last visited
Everything posted by Deadlyapples
-
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
Ok. My idea is tools that change but keep their data. So a Pick, upgrades with a speed upgrade but then might level up to another pick, so it needs to keep the speed upgrade. And because each tool might have a variety of different upgrades, the only way I can think of it working is if the item stays the same and the same ID but the texture changes and its stats change while other stats remain. Do you understand where I am coming from? -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
I actually slept on it and thought maybe 20 lines for each item isnt a big deal. The other thing I was thinking of is potentially storing all the items data within the nbt of that one item. Sooo. Sword kills mob. + 1 Kill onto the sword. -1 Durability to the sword. When sword reaches 100 kills - Do something! When durability reaches 1 - Sword texture changes to (Blah blah:swordtexture2) - Weapon durability disabled. - Weapon damage set to 1. ( So it does as much damage as punching) - If item.texture = swordtexture2 - Don't gain kills when mob killed. This way when the tool reaches 1 durability and then no longer functions as a normal tool, the texture is also switched out and it no longer gains kills etc. Any thoughts on that? -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
What are your opinions on setting out a separate class file for the detection of when my mod items damage entities they store NBT data. That way each of my tools doesn't need 20+ lines of code. It just refers to the separate class file? Any ideas or tips? -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
coolAlias. Is there any way of sending information out to the game chat. For example. Instead of System.out.println("Chatty chat chat"); Which is console bound. Is there a way to display text in the chat area that is in the game? -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
Since making my code work how I want I have made quite a bit of progress! I have a question about variables. Is it possible to have an item retain a variable to be used later on? I have a claymore weapon which as it kills mobs, needs to retain the number of kills it has. I have a variable declared at the start of the class and it works for the most part. But when I shut down the client and reload it the variables are lost. Do I need to make a sort of player.dat file which contains information of the weapons. My only thought is that having a file to save the data might start getting more and more full as more weapons are made and used which would not be desirable. Any thoughts? I have seen in your code you do something similar but is there an easier way for me to understand what you are doing? -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
coolAlias. I want to say thankyou very much for your help with this! I have the code working more or less as I intended and I really appreciate your support! -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
I apologize. I swear I am loosing my mind or something. -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
When I use @Override at the public boolean onBlockDestroyed it complains saying : The method onBlockDestroyed(ItemStack, World, int, int, int, int, EntityLivingBase) of type FusedBoneClaymore must override or implement a supertype method I have googled for the past hour and have no better idea as to what that means. Thanks -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
I have no idea how to check for durability other than getDamage() But I don't know how to save that as a variable and then if variableOfDurability = 1 or less then give item. I just don't know how to code that. It complained that it needs to be a Boolean. Then says that it doesn't work and needs to be an int. argh headache! The other thing as well is I have added in System.out.println("Block was broken") and others like that so I can track the code as it works and it never prints out the block has been broken or that I hit an entity. -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
That is the basic code. No fancy item on destroy stuff. This next bit is was I am trying but I just can't get my head around it. Help would be appreciated. Tell me what I did wrong and tell me what I did right or what I can do. Examples help too. I really am trying and I just lost when I don't know what methods and exist and lack of experience in using the events and methods as well as lack of programming experience in general. I have trained to be a 3D modeler and audio engineer so this stuff is still new. But I find it fascinating and want to learn more by making a mod and learning as I go with the help from kind people like yourselves. -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
Sorry about this but I just can't get this working. I am still new to the whole programming thing and if someone could just show me a way of getting it to work that would be great. I have tried for several hours with bits of ideas from your code coolAlias but I just can't get it to work. I ended up at the point where my item wasn't doing any damage. I tried also setting up console notifications so I could see the code progress with simple println("Step 1"); kind of stuff but it never triggers. Am I missing something here or what hehe. It must be frustrating trying to help people when they just can get it but if you will bear with me and once I understand they way in which the code needs to be layed out it will be golden! -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
I'll give this a go guys! Much appreciated. If you think of anything else I would also appreciate that. I'll give this a go! -
Swap tools for an item when reaching 1 durability - Need Help.
Deadlyapples replied to Deadlyapples's topic in Modder Support
Hotrods. I will try that out shortly. Thankyou for the quick reply! -
Hi guys! I am really enjoying learning to mod and some things I can work out for myself and I have been doing so far however I have come to a point in my mod that I just can't work out or get past on my own and I am asking for some assistance if possible! Let me set the scene for you! I have a very nice pickaxe, its all working fine. Crafting recipe, custom items for crafting etc. These custom items drop from skeletons, but they only drop when these skeletons are burning, either in daylight or other sources. The tools function as you would expect. They have durability and material properties similar to iron! Here is where I want to go but I don't know how to get there! When the tool reaches 0 durability, instead of it breaking and being lost forever, it becomes a broken version of the tool. Useless in its current form! In order to fix this you place it in a custom block (I am thinking of maybe a kind of repair station which uses meat as fuel) There is a progress bar which shows how long it is going to take till the tool is repaired. Once the bar fills up the tool is fully repaired and is now usable again. Now I know that this is maybe a lot to ask for but if I can even just get some help with swapping the pick, that is about to break, into another item which would be a broken variation of the tool which is basically just an item with a similar texture. I hope someone can help me with this. At the moment the way of mod is layout out is its just like any other basic tool and gear mod. Each tool has its own class etc. Am I looking at putting code into the Tool's class file or a desperate class which handles the tool to item swapping upon reaching 0 durability? This forum is sort of a last resort as I have asked all over and have had no luck. Either that or I have had an experience programming laughing at me because of my lack of knowledge with java programming. But I most definitely not a complete idiot (Not entirely anyway ). Any help I can get would be appreciated! SUMMARY! How do I check an item / tool / armors durability level? How do I then make an if statement based on that item / tool / armors durability level? How do I replace one item with another? If those 3 questions can be answered in a way which I can process and understand I will love you eternally.
-
Hi guys! I am just trying to work out how I would go about doing this. I have a series of tools and weapons that have durability which is fine but my idea is that they use of their durability but never break. But once they reach 0 durability they no longer function. I just can't get my head around what I do to make this happen! Also on another note. Is there a place where all the minecraft / forge functions are so I can learn to understand what they do and why? I realize I am a bit of a programming noob but I have the capacity to learn and I prefer jumping in with a project and learning as I go and with the help of you kind people on the Minecraft Forge forums!
-
Hiya guys. I am new to these forums and I am fairly new to modding in general but I am really having fun but I find it hard to work things out without a little help or references to look at and dissect and I am here to ask for some help! I have a mod in the works. Basic stuff, tools, armor, crafting benches etc but I am now at a point that I don't know how to get through. How do you go about making a custom item you have made drop from a normal / vanilla mob. I don't want to go creating a mob if I don't have to. I have an item that I want skeletons to drop but with a chance of 5%. I have look for tutorials and have few very few. Most of which I tried and they didn't work, whether that's due to my lack of experience or incompatibility due to changes with Forge. Anyway! I am asking for some help here guys, if it is at all possible. I appreciate any help I can get! Thanks guys!