Posted June 4, 20169 yr For my gun mod, I want to create items that can be put onto then guns and they are able to modify things such as damage, ect. What I am wondering is what would be the way I would make a single (or multiple) item(s) that each change a different (or multiple) attribute(s) on the gun, and how to define what they change?
June 4, 20169 yr Capabilities and stuff like this: https://github.com/Draco18s/Artifacts/tree/master/main/java/com/draco18s/artifacts/components 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.
June 4, 20169 yr Author How would I go about just manually making these upgrades with item capabilities and creating items with them?
June 4, 20169 yr 1. Capabilities are, basically, sort of data storage. (in RAM/HDD, anyway) So you can use it to store your Capabilities. 2. To use the data, one can use Event System. There are several events like LivingAttackEvent, which will fit your needs. - How to use the data in the events? 1) Get the Caps from the ItemStack 2) Apply effects for the caps 3. Most event methods of Item class has ItemStack as parameter. So you can also use Caps there, if you have central Item class to control all of the guns. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
June 4, 20169 yr Author Here's the thing, I have a gun item that has and ItemStackHandler that hold all that parts for that gun. What I want is to be able to add upgrades to the gun, and those upgrades modify different things. Also I would like the upgrades to have different tiers/modify multiple things such as say an Upgrade that adds 1 damage and 1 reload, or an upgrade that removes 2 damage and adds 1 clip. How would I do this with or without capabilities? Also these upgrades are not craftable in the crafting table.
June 4, 20169 yr Here's the thing, I have a gun item that has and ItemStackHandler that hold all that parts for that gun. What I want is to be able to add upgrades to the gun, and those upgrades modify different things. Also I would like the upgrades to have different tiers/modify multiple things such as say an Upgrade that adds 1 damage and 1 reload, or an upgrade that removes 2 damage and adds 1 clip. How would I do this with or without capabilities? Also these upgrades are not craftable in the crafting table. If the upgrades belong to the gun, then you should store the capabilities to the itemstack for guns. In this case, 1. Upgrades for the gun: Capabilities for the gun. - The implementation may vary up to your purpose and design decision. 2. Applying the effect: Use events, and check for the capabilities(upgrades). I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
June 4, 20169 yr Author Alright, now also I have a projectile entity that spawns when my gun is right-clicked (like an arrow from a bow), the only problem is that it moves on the server side, but on the client side it stays where it was spawned. This is the code: http://pastebin.com/wE5ZqNuB
June 4, 20169 yr Without thinking much - aren't projectiles supposed to receive velocity updates? "true" in projectile registration. 1.7.10 is no longer supported by forge, you are on your own.
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.