Jump to content

[1.14.4] "Internal server error" with my mod


GttiqwT

Recommended Posts

Hello I made a mod with custom armor (flaming obsidian armor) and when I equip it in my server I get kicked for "Internal server error"

This is the log that I can find about my mod:

 

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: java.lang.NoSuchMethodError: net.minecraft.entity.player.InventoryPlayer.func_70440_f(I)Lnet/minecraft/item/ItemStack;
at mod.gttiqwt.emeraldobsidian.init.items.FlamingArmor.onArmorTick(FlamingArmor.java:37) ~[FlamingArmor.class:?]

idk how to put spoilers sorry for the long text..

how do I fix this? I think its because its rendering the armor on client side or something and I've had to fix this for an older mod but dont know how to. thanks :)

here's my class for the armor also: (The armor just extends "ArmorItem" basically and adds some potion effects when the full set it worn. works in singeplayer)

{
    public UpgradedArmor(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder)
    {
        super(materialIn, slot, builder);
    }
     @Override
        public void onArmorTick(ItemStack stack, World world, PlayerEntity player) {
            if(player.getItemStackFromSlot(EquipmentSlotType.HEAD).getItem() == ItemList.jewelled_emerald_helmet && 
                player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == ItemList.jewelled_emerald_chestplate && 
                player.getItemStackFromSlot(EquipmentSlotType.LEGS).getItem() == ItemList.jewelled_emerald_leggings && 
                player.getItemStackFromSlot(EquipmentSlotType.FEET).getItem() == ItemList.jewelled_emerald_boots) 
            {            
                    player.addPotionEffect(new EffectInstance(Effects.REGENERATION));
                    player.addPotionEffect(new EffectInstance(Effects.HERO_OF_THE_VILLAGE)); //instead of luck, better trades forever!
                    player.addPotionEffect(new EffectInstance(Effects.WATER_BREATHING));
                    player.addPotionEffect(new EffectInstance(Effects.HASTE));
            }
            if(player.getItemStackFromSlot(EquipmentSlotType.HEAD).getItem() == ItemList.flaming_obsidian_helmet && 
                    player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == ItemList.flaming_obsidian_chestplate && 
                    player.getItemStackFromSlot(EquipmentSlotType.LEGS).getItem() == ItemList.flaming_obsidian_leggings && 
                    player.getItemStackFromSlot(EquipmentSlotType.FEET).getItem() == ItemList.flaming_obsidian_boots)
                {
                        player.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE));
                        player.addPotionEffect(new EffectInstance(Effects.RESISTANCE));
                        player.addPotionEffect(new EffectInstance(Effects.STRENGTH)); //new
                }
        }
}

 and then registered like this in the main class:

ItemList.flaming_obsidian_helmet = new UpgradedArmor(ArmorMaterialList.flaming_obsidian, EquipmentSlotType.HEAD, new Item.Properties().group(itemTab)).setRegistryName(location("flaming_obsidian_helmet")),
						ItemList.flaming_obsidian_chestplate = new UpgradedArmor(ArmorMaterialList.flaming_obsidian, EquipmentSlotType.CHEST, new Item.Properties().group(itemTab)).setRegistryName(location("flaming_obsidian_chestplate")),
						ItemList.flaming_obsidian_leggings = new UpgradedArmor(ArmorMaterialList.flaming_obsidian, EquipmentSlotType.LEGS, new Item.Properties().group(itemTab)).setRegistryName(location("flaming_obsidian_leggings")),
						ItemList.flaming_obsidian_boots = new UpgradedArmor(ArmorMaterialList.flaming_obsidian, EquipmentSlotType.FEET, new Item.Properties().group(itemTab)).setRegistryName(location("flaming_obsidian_boots"))

 

Link to comment
Share on other sites

heres some more info:

> [K[33;1m[07:12:53] [Server thread/WARN] [minecraft/NetworkSystem]: Failed to handle packet for / (server ip)
net.minecraft.util.ReportedException: Ticking player
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:459) ~[oq.class:?]
at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:173) ~[pa.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:209) ~[NetworkDispatcher$1.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:285) ~[gw.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:180) [oz.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:790) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:397) [nz.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: java.lang.NoSuchMethodError: net.minecraft.entity.player.InventoryPlayer.func_70440_f(I)Lnet/minecraft/item/ItemStack;
at mod.gttiqwt.emeraldobsidian.init.items.FlamingArmor.onArmorTick(FlamingArmor.java:37) ~[FlamingArmor.class:?]
at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:371) ~[aec.class:?]
at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:511) ~[aed.class:?]
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2179) ~[vp.class:?]
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:234) ~[aed.class:?]
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:382) ~[oq.class:?]
... 9 more
[39;0m> [K[07:12:53] [Server thread/INFO] [Astral Sorcery]: [Astral Sorcery] Synchronizing baseline information to GttiqwT
> [K[07:12:53] [Server thread/INFO] [minecraft/NetHandlerPlayServer]: GttiqwT lost connection: Internal server error

 

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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