November 13, 201311 yr https://github.com/Draco18s/Artifacts Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 13, 201311 yr Author https://github.com/Draco18s/Artifacts Ok, cool, but can you explain it a little bit? Please
November 13, 201311 yr I need a better idea of what the goal you have in mind is, first. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 14, 201311 yr Author I need a better idea of what the goal you have in mind is, first. OK, i want to create items like the ones which have your mod, not artfacts or something like it, items that can have different damages (like tools, every tool have a different max damage) and also items that are "normal" items (with lore, multiple render passes, etc.) I hope you can help me
November 14, 201311 yr Ok, so to start off, all you're talking about is making new items that behave in different ways, each one will have its own class. Different maximum damage is simply just a property of that class instance. You haven't even gotten to the point where you need NBT data yet. My artifacts are unique in that they all use the same class, and the effects ("throws fireballs" "heals the player" "causes lightning") are handled separately with key-value data stored in the NBT. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 14, 201311 yr Feom that what i read you could create a interface that handle every case and you can store the maxDamage in every class. And the Item call the interface and call the functions you implemented. Like BC Pipes. Its a little bit advanced Programming but with that you have a modular Item.
November 14, 201311 yr Override methods in Item which have ItemStack as argument. Add different behaviour according to that ItemStack NBTTagCompound. Example: @Override public int getMaxDamage(ItemStack stack) { if(stack.hasTagCompound() && stack.stackTagCompound.hasKey("SubType")){ return new ItemBehavior(stack.getKey("SubType")).getMaxDamage(); } else return super.getMaxDamage(stack); }
November 14, 201311 yr Author Ok, so to start off, all you're talking about is making new items that behave in different ways, each one will have its own class. Different maximum damage is simply just a property of that class instance. You haven't even gotten to the point where you need NBT data yet. My artifacts are unique in that they all use the same class, and the effects ("throws fireballs" "heals the player" "causes lightning") are handled separately with key-value data stored in the NBT. Yes, i know it can be make without NBT, but using various IDs, but i want to make this items using only one ID, and the cause that i don't use metadata is that the tool are already using it to store damage. P.D.: I think i should have said if before
November 14, 201311 yr So use an NBT tag to store your "metadata" and just use that value everywhere the Item class calls a function and passes an ItemStack. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 14, 201311 yr Author So use an NBT tag to store your "metadata" and just use that value everywhere the Item class calls a function and passes an ItemStack. Yes, basically i want it
November 14, 201311 yr So start coding o..o Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 15, 201311 yr Author So start coding o..o Ohh, no. I don't know what i were thinking about, I want to create items which will have a common class, like your artifacts.
November 15, 201311 yr So look at Artifacts. You're going to be using almost the entire code base. "Components" you'll be replacing to be the effects YOU want, and the FactoryArtifacts is going to need to be changed as well (as its based on the assumption that things are random). Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.