Jump to content

Game keep crashing

Recommended Posts

I have a problem about my game keep crashing because of my code.


package net.flexstudios.armorytests.items;

import com.google.common.collect.Multimap;
import net.minecraft.entity.ai.attributes.Attribute;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.Attributes;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.*;

public class PoweredChestplateItem extends ArmorItem {

    public PoweredChestplateItem(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder) {
        super(materialIn, slot, builder);

    public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlotType equipmentSlot) {
        Multimap<Attribute, AttributeModifier> result = super.getAttributeModifiers(equipmentSlot);
        result.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Armor dmg", (double)4, AttributeModifier.Operation.ADDITION));
        return result;


A part of the crashing report:

Description: Initializing game

java.lang.UnsupportedOperationException: null
	at com.google.common.collect.ImmutableMultimap.put(ImmutableMultimap.java:427) ~[guava-21.0.jar:?] {}
	at net.flexstudios.armorytests.items.PoweredChestplateItem.func_111205_h(PoweredChestplateItem.java:19) ~[?:beta1.0.0] {re:classloading}
	at net.minecraftforge.common.extensions.IForgeItem.getAttributeModifiers(IForgeItem.java:77) ~[?:?] {re:classloading}
	at net.minecraft.item.ItemStack.func_111283_C(ItemStack.java:844) ~[?:?] {re:classloading}
	at net.minecraft.item.ItemStack.func_82840_a(ItemStack.java:614) ~[?:?] {re:classloading}
	at net.minecraft.client.Minecraft.lambda$populateSearchTreeManager$7(Minecraft.java:642) ~[?:?] 


Edited by ThreeShotMan33001
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.

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.


  • Create New...

Important Information

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