Jump to content

[1.14] Custom armor with vanilla repair items


nenikitov

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • hello there, is there any Plugin/Mod/Datapack that can create a skyblock dimension for ech player that using /is create or something. cuz i have a allthemods 9 server and i wanted to make some skyblock out of it but i dont want that every player needs to download a mod for it or anything so i want to make it like the SuperiorSkyblock plugin but it generates worlds and i need Dimensions for forge. if anyone knows how i can make this happen i thank you very much.
    • Hey everyone, I am starting a brand new Minecraft server by the name “WILZON”. This server will include game modes such as Skyblock, PVP, Survival, but it is mainly focused and based on the Survival gamemode. As of right now, the staff that will be recruited won’t be paid so this will only be volunteer work at the moment… BUT in the future when the server starts making money, the staff WILL be paid by splitting the revenue! What am I looking for?: Plugin Manager(s) Someone/People with Server knowledge Someone/People with Server experiences Someone/People who could moderate the server Builder(s) Someone who would be willing to promote/advertise (if possible) Tester(s) If you have anymore questions or are interested, DM me on Discord @wilzonn OR you can join this Server (https://discord.gg/eDwhHwygzW)
    • Damn it was good mod, sad i had to remove it, but it worked and thank you so much for your help! Also, 2 things: do you detect what mod is causing the crash by seeing which mod in the crash report is listed the most? And, this is a random question but, do worldgen mods like tectonic cause less mobs to spawn in vanilla and modded biomes? Again thanks so much for your help.
    • public class FireDot extends MobEffect { public FireDot() { super(MobEffectCategory.HARMFUL, 0x660990); getLogger().info("Test Log 999994 "); } @Override public void applyEffectTick(LivingEntity entity, int amplifier) { if (entity instanceof LivingEntity) { entity.hurt(entity.damageSources().inFire(), 0.1F + amplifier); getLogger().info("Test Log 22333 : ") } } public boolean isDurationEffectTick(int duration, int amplifier) { int tickInterval = 2; return duration % tickInterval == 0; } } this is my custom MobEffect public class ModEffects { public static final DeferredRegister<MobEffect> MOB_EFFECTS = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, DoJiJoJu.MODID); public static final RegistryObject<MobEffect> FIRE_DOT = MOB_EFFECTS.register("fire_dot", FireDot::new); public static void register(IEventBus eventBus) {MOB_EFFECTS.register(eventBus);} } and I registed in Registry ModEffects.register(modEventBus); in my Main Class ((LivingEntity) this.target).addEffect(new MobEffectInstance(ModEffects.FIRE_DOT.get(), 100, 1)); getLogger().info("Test Log 888884 " + ModEffects.FIRE_DOT.get()); I add the Effect by this way and the `Log 888884` was printed but other Logs wasn't printed. The effect of MobEffectCategory.HARMFUL, 0x660990 was visible. but the hurt code wasn't work why It doesn't work? I tested in Creative mode and solo play Thank you
  • Topics

×
×
  • Create New...

Important Information

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