Search the Community
Showing results for tags 'armour'.
-
I am wanting to give the armour in my mod special properties, but I have no idea how to do so. For the first armour set I want it to be the case that when the full set is worn it has the properties of a carved pumpkin, making it so you won't aggravate endermen when you look at them. The second, and presumably harder property is that for the second set I would like it to be the case that when the full set is worn, you can walk over the void without falling. (I was considering using the levitation to accomplish this but I wanted to check beforehand). Would both of these specialities be achievable for each armour set and how exactly would they both be done? Help would be much appreciated.
-
Title explains it all, I think. I'm attempting to make an armor set that extends from DyeableArmorItem instead of ArmorItem and for some reason the armor model's color is not changing in-game. While the dye crafting recipes work, the resulting "tint colors" are not showing up on my character or on the inventory icon (except for the "Dyed" tag). Any assistance?
-
Hello there! I'm making an addon/connector between Epic Knights and TerraFirmaCraft, and I've already done initial release but now while working on retexturing Epic Knights' armor to match with TFC artstyle I've encountered a problem which is in the title. I tried to replace a vanilla armor with my texture and it worked. I tried to replace items from Epic Knights and it worked. I tried to replace armor in both TerraFirmaCraft and Epic Knights and it did not work. Any help woukd be appreciated. Btw resourcepack works and replaces armor just fine. But I don't want to use it. https://imgur.com/a/Hvd9Faq here are all the screenshots
-
Im currently making a mod where i'm attempting create a class extending ArmorItem that adds a function teleporting any mob that attacks the player a certain distance, however i'm having issues with finding a method that checks if the player has taken damage or been attacked, let alone then checking what attacked them. If anyone could help i would be very thankful.
-
Hi, I need suggestions. I am a beginner in Minecraft Modding. I would like to apply custom effects to some armors, something like: more chance to drop seeds, change zombie awareness, drop more pieces of wood when chopping logs, and things like that. How would you recommend me to do it, is there any library that has something similar and which ones would you recommend me?.
-
Hi! I’m looking to commission a custom Minecraft mod for version 1.19.2 on Forge. I want to have a balanced Copper tools and armor mod that snugly fits the copper tier between the Stone/ Chainmail and Iron Tiers. Here are the stats I have planned: - Copper Helmet: 2 Armor Points, 121 Durability - Copper Chestplate: 5 Armor Points, 2 Armor Toughness, 177 Durability - Copper Leggings: 4 Armor Points, 2 Armor Toughness, 165 Durability - Copper Boots: 2 Armor Points, 143 Durability - Copper Tools: Same Efficiency, but 0.5 less damage than Iron Tier, and 181 Durability for each tool. I only want to add the basic tools such as a sword, pickaxe, axe, shovel, and hoe. Please let me know of any balancing changes you would make and where I could go right now to commission such a mod.
-
I have a problem, I am trying to put two different effects to two different armors but when I run it only the emerald armor effect works. This is the code public class ModArmorItem extends ArmorItem{ private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP = (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>()) .put(ModArmorMaterials.EMERALD, new MobEffectInstance(MobEffects.HERO_OF_THE_VILLAGE,200, 1,false,false, true)) .put(ModArmorMaterials.OBSIDIAN, new MobEffectInstance(MobEffects.FIRE_RESISTANCE,200, 1,false,false, true)).build(); public ModArmorItem(ArmorMaterial pMaterial, Type pType, Properties pProperties) { super(pMaterial, pType, pProperties); } @Override public void onArmorTick(ItemStack stack, Level world, Player player){ if (!world.isClientSide()) { if (hasFullSuitOfArmorOn(player)) { evaluateArmorEffects(player); } } } private void evaluateArmorEffects(Player player) { for (Map.Entry<ArmorMaterial,MobEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()){ ArmorMaterial mapArmorMaterial = entry.getKey(); MobEffectInstance mapStatusEffect = entry.getValue(); if (hasCorrectArmorOn(mapArmorMaterial, player)) { addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect); } } } private void addStatusEffectForMaterial(Player player, ArmorMaterial mapArmorMaterial, MobEffectInstance mapStatusEffect) { boolean hasPlayerEffect = player.hasEffect(mapStatusEffect.getEffect()); if (hasCorrectArmorOn(mapArmorMaterial, player) && !hasPlayerEffect) { player.addEffect(new MobEffectInstance(mapStatusEffect)); } } private boolean hasCorrectArmorOn(ArmorMaterial material, Player player) { for (ItemStack armorStack : player.getInventory().armor){ if (!(armorStack.getItem() instanceof ArmorItem)) { return false; } } ArmorItem helmet = ((ArmorItem)player.getInventory().getArmor(3).getItem()); ArmorItem breastplace = ((ArmorItem)player.getInventory().getArmor(2).getItem()); ArmorItem leggins = ((ArmorItem)player.getInventory().getArmor(1).getItem()); ArmorItem boots = ((ArmorItem)player.getInventory().getArmor(0).getItem()); return helmet.getMaterial() == material && breastplace.getMaterial() == material && leggins.getMaterial() == material && boots.getMaterial() == material; } private boolean hasFullSuitOfArmorOn(Player player){ ItemStack helmet = player.getInventory().getArmor(3); ItemStack breastplace = player.getInventory().getArmor(2); ItemStack leggins = player.getInventory().getArmor(1); ItemStack boots = player.getInventory().getArmor(0); return !helmet.isEmpty() && !breastplace.isEmpty() && !leggins.isEmpty() && !boots.isEmpty(); } } Also when I place two effects on the same armor, the game crashes. Here is the crash file. The code is the same, only this part is different private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP = (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>()) .put(ModArmorMaterials.EMERALD, new MobEffectInstance(MobEffects.HERO_OF_THE_VILLAGE,200, 1,false,false, true)) .put(ModArmorMaterials.EMERALD, new MobEffectInstance(MobEffects.FIRE_RESISTANCE,200, 1,false,false, true)).build(); I hope you guys can help me. Thanks.
-
I'm trying to apply effects to the emerald armor but it doesn't work, I read that the onArmorTick() method doesn't work anymore, but I tried with inventoryTick, onInventoryTick and onArmorTick but they don't apply the effect either, I don't know if I'm writing it wrong, so I need help to fix it. This is the code in question: public class ModArmorItem extends ArmorItem{ private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP = (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>()) .put(ModArmorMaterials.EMERALD, new MobEffectInstance( MobEffects.HERO_OF_THE_VILLAGE, 200, 1, false, false, true)) .build(); public ModArmorItem(ArmorMaterial pMaterial, Type pType, Properties pProperties) { super(pMaterial, pType, pProperties); } @Override public void onArmorTick(ItemStack stack, Level world, Player player){ if (!world.isClientSide()) { if (hasFullSuitOfArmorOn(player)) { evaluateArmorEffects(player); } } } private void evaluateArmorEffects(Player player) { for (Map.Entry<ArmorMaterial,MobEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()){ ArmorMaterial mapArmorMaterial = entry.getKey(); MobEffectInstance mapStatusEffect = entry.getValue(); if (hasCorrectArmorOn(mapArmorMaterial, player)) { addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect); } } } private void addStatusEffectForMaterial(Player player, ArmorMaterial mapArmorMaterial, MobEffectInstance mapStatusEffect) { boolean hasPlayerEffect = player.hasEffect(mapStatusEffect.getEffect()); if (hasCorrectArmorOn(mapArmorMaterial, player) && !hasPlayerEffect) { player.addEffect(new MobEffectInstance(mapStatusEffect)); } } private boolean hasCorrectArmorOn(ArmorMaterial material, Player player) { for (ItemStack armorStack : player.getInventory().armor){ if (!(armorStack.getItem() instanceof ArmorItem)) { return false; } } ArmorItem helmet = ((ArmorItem)player.getInventory().getArmor(3).getItem()); ArmorItem brestplace = ((ArmorItem)player.getInventory().getArmor(2).getItem()); ArmorItem leggins = ((ArmorItem)player.getInventory().getArmor(1).getItem()); ArmorItem boots = ((ArmorItem)player.getInventory().getArmor(0).getItem()); return helmet.getMaterial() == material && brestplace.getMaterial() == material && leggins.getMaterial() == material && boots.getMaterial() == material; } private boolean hasFullSuitOfArmorOn(Player player){ ItemStack helmet = player.getInventory().getArmor(3); ItemStack breastplace = player.getInventory().getArmor(2); ItemStack leggins = player.getInventory().getArmor(1); ItemStack boots = player.getInventory().getArmor(0); return !helmet.isEmpty() && !breastplace.isEmpty() && !leggins.isEmpty() && boots.isEmpty(); } } And here is the armor public static final RegistryObject<Item> EMERALD_HELMET = ITEMS.register( "emerald_helmet", () -> new ModArmorItem(ModArmorMaterials.EMERALD, ArmorItem.Type.HELMET, new Item.Properties()) ); public static final RegistryObject<Item> EMERALD_CHESTPLATE = ITEMS.register( "emerald_chestplate", () -> new ModArmorItem(ModArmorMaterials.EMERALD, ArmorItem.Type.CHESTPLATE, new Item.Properties()) ); public static final RegistryObject<Item> EMERALD_LEGGINS = ITEMS.register( "emerald_leggins", () -> new ModArmorItem(ModArmorMaterials.EMERALD, ArmorItem.Type.LEGGINGS, new Item.Properties()) ); public static final RegistryObject<Item> EMERALD_BOOTS = ITEMS.register( "emerald_boots", () -> new ModArmorItem(ModArmorMaterials.EMERALD, ArmorItem.Type.BOOTS, new Item.Properties()) ); I hope you can help me. Thanks.
-
Hello. I am trying to read the value (durability) from a config file for an Shield Item. I cant get the code to work and i need some help. So I just need help on how to call the value from the config file. The code from the Config file works absolutely fine. Here is the code of my Shield Item getting registered and getting the Properties. public static final DeferredItem<Item> LEATHER_SHIELD = ITEMS.register("leather_shield", () -> new ShieldItem(new Item.Properties().durability(MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get())){ @Override public int getMaxDamage(ItemStack stack) { return MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get(); } });
-
Topic for making tags
-
- 1.10.2
- 1.11.2
-
(and 81 more)
Tagged with:
- 1.10.2
- 1.11.2
- 1.12.2
- 1.13.2
- 1.14.4
- 1.15.2
- 1.16.5
- 1.17.1
- 1.18.2
- 1.19.0
- 1.19.1
- 1.19.2
- 1.19.3
- 1.19.4
- 1.2.5
- 1.20.0
- 1.3.2
- 1.4.7
- 1.5.2
- 1.6.4
- 1.7.10
- 1.8.9
- 1.9.4
- armour
- bad jvm args
- biomes
- blocks
- broken mod
- bug
- capabilities
- client
- client-only mods on server
- codecs
- commands
- dimensions
- effects
- enchantments
- entities
- events
- feature request
- fluids
- food
- gradle
- groovy
- guis
- ide
- installer
- items
- java
- kotlin
- launcher
- libraries
- loot
- metadata
- missing jar association
- missing java
- missing mods
- mixin
- needs more info
- networking
- news
- optifine
- ores
- out of memory
- outdated drivers
- particles
- performance
- porting
- potions
- recipes
- registries
- rendering
- scala
- server
- solved
- sounds
- textures
- tools
- tutorial
- weapons
- worldgen
- wrong java version
- wrong mod version
-
Hi, first of all apologies for my inexperience with modding in general but.. Could somebody help explain how I could change the colour of a piece of armour based off of its NBT colour tab (along with it's item), just like how leather armour works in vanilla. I'm doing this in 1.20.1 using GeckoLib for my armour. I've already got the NBT tag bit working I just need help/ideas of how to make the colour change work. I can provide what code I do have however most of it is from this tutorial: https://www.youtube.com/watch?v=3zqxU7vjHmQ&ab_channel=ModdingbyKaupenjoe Thanks for any help you can give