Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.