Jump to content

Recommended Posts

Posted

I've created my custom armor and i want it to have iron ingots as repair item. The problem is I simply don't know what should I write to get Item from vanilla game. For example for getting my custom Items I can use ItemList.ITEMNAME (I have ItemList class with all my items). But what shoul I write to get vanilla iron ingot?

Posted

Items.IRON_INGOT?

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

On of my voids, all variables are declared before it so this works good.

private ArmorMaterialList(String name, int[] durability, int[] damageReductionAmmounts, int enchantability, String equipSound, float toughness, Item repairItem)
	{
		this.name = name;
		this.durability = durability;
		this.damageReductionAmmounts = damageReductionAmmounts;
		this.enchantability = enchantability;
		this.equipSound = equipSound;
		this.toughness = toughness;
		this.repairItem = repairItem;
	}

Here in the line

reinforced_iron("reinforced_iron", new int[] {183, 249, 298, 216}, new int[] {3, 6, 7, 3}, 11, "item.armor.equip_iron", 0.0f, Items.IRON_INGOT),

Items is underlined with red

 

179356243_2019-11-24171650.thumb.png.494055b20b08d7dd69014ab9cd6f200f.png

And there is no import fixes

  • Thanks 1
Posted
10 minutes ago, nenikitov said:

On of my voids

"Void" is the return type of a method. That thing is called a "method" and when it does not have a return, its return type is "void."

11 minutes ago, nenikitov said:

And there is no import fixes

import net.minecraft.item.Items;

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/HarderFarming.java#L31

  • Thanks 1

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.

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.