Jump to content

Recommended Posts

Posted

Hey me and some others are working on a mod that gives armor weight! We are currently having a problem or two and was wondering if someone could point us in the right direction!

 

Here's the source codes:

 

This ticks with the player and checks if the player is wearing armor:

 

package MinecraftRPGOverhaul.events;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerCapabilities;
import MinecraftRPGOverhaul.items.ModArmor;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;

public class ModEventHandler {

         private EntityPlayer player;

        @SubscribeEvent
         public void onEntityUpdate(PlayerTickEvent event) {   

                PlayerCapabilities cap = ObfuscationReflectionHelper.getPrivateValue(EntityPlayer.class, player, "capabilities", "field_71075_bZ");
                ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, cap,  ModArmor.armorCall(player), "walkSpeed", "field_73357_f");
                ModArmor.armorCall(player);
               
        }
       

 

 

This is wear we check armor and assign values and such. It's really rough as we are just trying to get it to work before optimizing and prettying it up, sorry.

 

package MinecraftRPGOverhaul.items;

import java.awt.List;
import java.util.ArrayList;
import java.util.Arrays;

import cpw.mods.fml.common.ObfuscationReflectionHelper;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;

public class ModArmor extends ItemArmor{

        //set the different weight classes
        private static final float HEAVYARMOR = 0.05f;
        private static final float MEDIUMARMOR = 0.025f;
        private static final float LIGHTARMOR = 0.01f;
       
        //weight for each armor piece
        private static float bootWeight = 0.0f;
        private static float chestplateWeight = 0.0f;
        private static float helmetWeight = 0.0f;
        private static float leggingWeight = 0.0f;
       
        //total armor weight
        private static float totalWeight = 0.0f;
       
        public static Item heavyBoots[] = new Item[] { ModItems.puriteBoots };

        public String textureName; //The texture name, the name is passed in via the 'ModArmor' method

        public ModArmor(String unlocalizedName, ArmorMaterial material, String textureName, int type){ //ModArmor method, passes in all pertinent information to create a piece of armor
           
                super(material, 0, type);
            this.textureName = textureName;
            this.setTextureName(unlocalizedName);
        }
       
        @Override
        public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ //getArmorTexture method, uses previous information passed in to assure you have the right texture
                return "rpgmod" + ":armor/" + this.textureName + "_" + (this.armorType == 2 ? "2" : "1") + ".png";
        }
       
        public static float armorCall(EntityPlayer player) {
                setCurrentArmorWeight(player);
               
                PlayerCapabilities cap = ObfuscationReflectionHelper.getPrivateValue(EntityPlayer.class, player, "capabilities", "field_71075_bZ");
            return ((1.0f - totalWeight)/10);
           
               
        }
       
        public static boolean wearingArmor (EntityPlayer player) {
               
                try {
                        player.getCurrentArmor(0);
                        System.out.println("Checked Armor!");
                        return true;
                       
                       
                } catch(NullPointerException e) {
                        System.out.println("Not wearing armour");
                        return false;
                }
        }
       
        public static void setCurrentArmorWeight(EntityPlayer player) {
                if (wearingArmor(player)) {
                        //TODO change to switch statements?
                        if(player.getCurrentArmor(0).getItem().equals(ModItems.puriteBoots)){
                                bootWeight = HEAVYARMOR;
                        }
                        if(player.getCurrentArmor(1).getItem().equals(ModItems.puriteLeggings)){
                                leggingWeight = HEAVYARMOR;
                        }
                        if(player.getCurrentArmor(2).getItem().equals(ModItems.puriteChestplate)){
                                chestplateWeight = HEAVYARMOR;
                        }      
                        if(player.getCurrentArmor(3).getItem().equals(ModItems.puriteHelmet)) {
                                helmetWeight = HEAVYARMOR;
                        }                      
                       
                        totalWeight = bootWeight + helmetWeight + chestplateWeight + leggingWeight;
                       
                } else {
                        totalWeight = 0.0f;
                }
        }

 

 

Here's the error, lol:

 

[22:14:09] [server thread/ERROR] [FML]: Unable to access any field [capabilities, field_71075_bZ] on type net.minecraft.entity.player.EntityPlayer
cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: java.lang.NullPointerException
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:121) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60) [ObfuscationReflectionHelper.class:?]
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18) [ModEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic) [?:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) [ASMEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345) [FMLCommonHandler.class:?]
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259) [EntityPlayer.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330) [EntityPlayerMP.class:?]
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329) [NetHandlerPlayServer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37) [C03PacketPlayer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271) [C03PacketPlayer$C06PacketPlayerPosLook.class:?]
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?]
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]
        at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [integratedServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source) ~[?:1.8.0_31]
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(Unknown Source) ~[?:1.8.0_31]
        at java.lang.reflect.Field.get(Unknown Source) ~[?:1.8.0_31]
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        ... 18 more
[22:14:09] [server thread/ERROR] [FML]: Exception caught during firing event cpw.mods.fml.common.gameevent.TickEvent$PlayerTickEvent@5ac0d47d:
cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: java.lang.NullPointerException
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:121) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60) ~[ObfuscationReflectionHelper.class:?]
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18) ~[ModEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic) ~[?:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345) [FMLCommonHandler.class:?]
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259) [EntityPlayer.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330) [EntityPlayerMP.class:?]
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329) [NetHandlerPlayServer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37) [C03PacketPlayer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271) [C03PacketPlayer$C06PacketPlayerPosLook.class:?]
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?]
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]
        at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [integratedServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source) ~[?:1.8.0_31]
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(Unknown Source) ~[?:1.8.0_31]
        at java.lang.reflect.Field.get(Unknown Source) ~[?:1.8.0_31]
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        ... 18 more
[22:14:09] [server thread/ERROR] [FML]: Index: 1 Listeners:
[22:14:09] [server thread/ERROR] [FML]: 0: NORMAL
[22:14:09] [server thread/ERROR] [FML]: 1: ASM: MinecraftRPGOverhaul.events.ModEventHandler@381ed137 onEntityUpdate(Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;)V
[22:14:09] [server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking player
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?]
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?]
        at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: java.lang.NullPointerException
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:121) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60) ~[ObfuscationReflectionHelper.class:?]
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18) ~[ModEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic) ~[?:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345) ~[FMLCommonHandler.class:?]
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259) ~[EntityPlayer.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330) ~[EntityPlayerMP.class:?]
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329) ~[NetHandlerPlayServer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37) ~[C03PacketPlayer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271) ~[C03PacketPlayer$C06PacketPlayerPosLook.class:?]
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]
        ... 5 more
Caused by: java.lang.NullPointerException
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source) ~[?:1.8.0_31]
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(Unknown Source) ~[?:1.8.0_31]
        at java.lang.reflect.Field.get(Unknown Source) ~[?:1.8.0_31]
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60) ~[ObfuscationReflectionHelper.class:?]
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18) ~[ModEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic) ~[?:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345) ~[FMLCommonHandler.class:?]
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259) ~[EntityPlayer.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330) ~[EntityPlayerMP.class:?]
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329) ~[NetHandlerPlayServer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37) ~[C03PacketPlayer.class:?]
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271) ~[C03PacketPlayer$C06PacketPlayerPosLook.class:?]
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]
        ... 5 more
[22:14:09] [server thread/ERROR]: This crash report has been saved to: C:\Users\Alex\Documents\GitHub\MinecraftRPGMod\eclipse\.\crash-reports\crash-2015-03-09_22.14.09-server.txt
[22:14:09] [server thread/INFO]: Stopping server
[22:14:09] [server thread/INFO]: Saving players
[22:14:09] [server thread/INFO]: Saving worlds
[22:14:09] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[22:14:09] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[22:14:09] [server thread/INFO]: Saving chunks for level 'New World'/The End
[22:14:10] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Why is it breaking 

Time: 09/03/15 10:14 PM
Description: Ticking player

cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: java.lang.NullPointerException
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:121)
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60)
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18)
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic)
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345)
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259)
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
        at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
Caused by: java.lang.NullPointerException
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source)
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(Unknown Source)
        at java.lang.reflect.Field.get(Unknown Source)
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117)
        ... 18 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
        at cpw.mods.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:121)
        at cpw.mods.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:60)
        at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:18)
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic)
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
        at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345)
        at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259)

-- Player being ticked --
Details:
        Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
        Entity ID: 193
        Entity Name: Player99
        Entity's Exact location: -118.09, 72.00, 251.67
        Entity's Block location: World: (-119,72,251), Chunk: (at 9,4,11 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
        Entity's Momentum: 0.00, -0.08, 0.00
Stacktrace:
        at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
        at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
        at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
        at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
        at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
        Connection: net.minecraft.network.NetworkManager@2312cc52
Stacktrace:
        at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
        at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
        Minecraft Version: 1.7.10
        Operating System: Windows 7 (amd64) version 6.1
        Java Version: 1.8.0_31, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
        Memory: 934180696 bytes (890 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
        JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
        AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
        IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
        FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
        mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
        FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
        Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
        RPGMod{1.0} [RPGMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
        Profiler Position: N/A (disabled)
        Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
        Player Count: 1 / 8; [EntityPlayerMP['Player99'/193, l='New World', x=-118.09, y=72.00, z=251.67]]
        Type: Integrated Server (map_client.txt)
        Is Modded: Definitely; Client brand changed to 'fml,forge'
[22:14:10] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-03-09_22.14.09-server.txt
[22:14:10] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
[22:14:10] [server thread/INFO] [FML]: Unloading dimension 0
[22:14:10] [server thread/INFO] [FML]: Unloading dimension -1
[22:14:10] [server thread/INFO] [FML]: Unloading dimension 1
[22:14:10] [server thread/INFO] [FML]: Applying holder lookups
[22:14:10] [server thread/INFO] [FML]: Holder lookups applied
[22:14:10] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[22:14:10] [Client thread/INFO] [FML]: Server terminated.

 

Posted

Hey me and some others are working on a mod that gives armor weight! We are currently having a problem or two and was wondering if someone could point us in the right direction!

 

Here's the source codes:

 

This ticks with the player and checks if the player is wearing armor:

http://pastebin.com/5t6iZ6Tr

 

This is wear we check armor and assign values and such. It's really rough as we are just trying to get it to work before optimizing and prettying it up, sorry.

http://pastebin.com/iXNMyYex

 

Here's the error, lol:

http://pastebin.com/KsHNXfHS

The hell? Don't use reflection. Use player.capabilities...

Maker of the Craft++ mod.

Posted

Hmm, I was told that could cause problems down the road when handling server side and such.

 

EDIT: Ok well that seems to have solved that error, any idea on why we're getting an error on ticking the player?

 

EDIT2: appears to be saying player is null, but i cant figure out why...

 

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at MinecraftRPGOverhaul.events.ModEventHandler.onEntityUpdate(ModEventHandler.java:17)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_ModEventHandler_onEntityUpdate_PlayerTickEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:345)
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:259)

-- Player being ticked --
Details:
Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
Entity ID: 193
Entity Name: Player163
Entity's Exact location: -118.09, 72.00, 251.67
Entity's Block location: World: (-119,72,251), Chunk: (at 9,4,11 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Entity's Momentum: 0.00, -0.08, 0.00
Stacktrace:
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@5cb42fdf
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

Posted

BAD:

private EntityPlayer player;

 

GOOD:

event.player / event.entity

 

EDIT: Also you design is kinda "static". I'd suggest making weigh values in NBT. Always keep in mind that items and block are singletons and there is only one instance per game (client/server).

 

EDIT 2

For speed look at potion and AttributeModifier. I'd stay with base value of speed and if you are wearing something heavy add slowing Modifier with value of x in every beggining of a tick for one tick. Many ways to do that actually. You could just add PotionEffect ;p

1.7.10 is no longer supported by forge, you are on your own.

Posted

Hey, I've done a little looking around on AttributeModifier, and i don't quite understand how to use it. I'm commonly seeing these three lines pop up in descriptions:

 

AttributeModifier attributemodifier = (AttributeModifier)entry.getValue();
                attributeinstance.func_111124_b(attributemodifier);
                attributeinstance.func_111121_a(new AttributeModifier(attributemodifier.func_111167_a(), this.getName() + " " + par3, this.func_111183_a(par3, attributemodifier), attributemodifier.func_111169_c()));

 

Also what are all the func_#####? I know what they /are/ but not what specific ones are, or where to find out what they all are, it always takes me forever to dig around enough to figure it out.  Also bonus points if you can explain why the hell functions are called numbers and not by a name that told people what they do, like what is the advantage to that????

Posted

Methods/Functions are called by numbers because when minecraft is compiled it also gets obfuscated, people then find out what these functions do and put it into the MCP Bot to help make it readable. I'm not sure if there's a benefit to the code being obfuscated other than preventing people from easily reading it.

 

func_111124_b -> removeModifier

func_111121_a -> applyModifier

func_111167_a -> getID

func_111183_a -> getAttributeModifierAmount

func_111169_c -> getOperation

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I am trying to make an attack animation works for this entity, I have followed tutorials on youtube, looked into Geckolib's documentation but I can't find why it isn't working. The walking animation works, the mob recognizes the player and attack them. The model and animations were made in Blockbench.   public class RedSlimeEntity extends TensuraTamableEntity implements IAnimatable { private final AnimationFactory factory = GeckoLibUtil.createFactory(this); private boolean swinging; private long lastAttackTime; public RedSlimeEntity(EntityType<? extends RedSlimeEntity> type, Level worldIn) { super(type, worldIn); this.xpReward = 20; } public static AttributeSupplier.Builder createAttributes() { AttributeSupplier.Builder builder = Mob.createMobAttributes(); builder = builder.add(Attributes.MOVEMENT_SPEED, 0.1); builder = builder.add(Attributes.MAX_HEALTH, 50); builder = builder.add(Attributes.ARMOR, 0); builder = builder.add(Attributes.ATTACK_DAMAGE, 25); builder = builder.add(Attributes.FOLLOW_RANGE, 16); return builder; } public static void init() { } @Override protected void registerGoals() { this.goalSelector.addGoal(3, new FloatGoal(this)); this.goalSelector.addGoal(1, new RedSlimeAttackGoal(this, 1.2D, false)); this.goalSelector.addGoal(4, new WaterAvoidingRandomStrollGoal(this, 1.0D)); this.goalSelector.addGoal(5, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(2, new RedSlimeAttackGoal.StopNearPlayerGoal(this, 1)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); } private <E extends IAnimatable> PlayState predicate(AnimationEvent<E> event) { if (event.isMoving()) { event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.model.walk", true)); return PlayState.CONTINUE; } event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.model.idle", true)); return PlayState.CONTINUE; } private <E extends IAnimatable> PlayState attackPredicate(AnimationEvent<E> event) { if (this.swinging && event.getController().getAnimationState() == AnimationState.Stopped) { event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.model.attack", false)); this.swinging = false; return PlayState.CONTINUE; } return PlayState.STOP; } @Override public void swing(InteractionHand hand, boolean updateSelf) { super.swing(hand, updateSelf); this.swinging = true; } @Override public void registerControllers(AnimationData data) { data.addAnimationController(new AnimationController<>(this, "controller", 0, this::predicate)); data.addAnimationController(new AnimationController<>(this, "attackController", 0, this::attackPredicate)); } @Override public AnimationFactory getFactory() { return factory; } class RedSlimeAttackGoal extends MeleeAttackGoal { private final RedSlimeEntity entity; public RedSlimeAttackGoal(RedSlimeEntity entity, double speedModifier, boolean longMemory) { super(entity, speedModifier, longMemory); this.entity = entity; if (this.mob.getTarget() != null && this.mob.getTarget().isAlive()) { long currentTime = this.entity.level.getGameTime(); if (!this.entity.swinging && currentTime - this.entity.lastAttackTime > 20) { // 20 ticks = 1 second this.entity.swinging = true; this.entity.lastAttackTime = currentTime; } } } protected double getAttackReach(LivingEntity target) { return this.mob.getBbWidth() * 2.0F * this.mob.getBbWidth() * 2.0F + target.getBbWidth(); } @Override protected void checkAndPerformAttack(LivingEntity target, double distToEnt) { double reach = this.getAttackReach(target); if (distToEnt <= reach && this.getTicksUntilNextAttack() <= 0) { this.resetAttackCooldown(); this.entity.swinging = true; this.mob.doHurtTarget(target); } } public static class StopNearPlayerGoal extends Goal { private final Mob mob; private final double stopDistance; public StopNearPlayerGoal(Mob mob, double stopDistance) { this.mob = mob; this.stopDistance = stopDistance; } @Override public boolean canUse() { Player nearestPlayer = this.mob.level.getNearestPlayer(this.mob, stopDistance); if (nearestPlayer != null) { double distanceSquared = this.mob.distanceToSqr(nearestPlayer); return distanceSquared < (stopDistance * stopDistance); } return false; } @Override public void tick() { // Stop movement this.mob.getNavigation().stop(); } @Override public boolean canContinueToUse() { Player nearestPlayer = this.mob.level.getNearestPlayer(this.mob, stopDistance); if (nearestPlayer != null) { double distanceSquared = this.mob.distanceToSqr(nearestPlayer); return distanceSquared < (stopDistance * stopDistance); } return false; } } @Override public void tick() { super.tick(); if (this.mob.getTarget() != null && this.mob.getTarget().isAlive()) { if (!this.entity.swinging) { this.entity.swinging = true; } } } } @Override public @Nullable AgeableMob getBreedOffspring(ServerLevel serverLevel, AgeableMob ageableMob) { return null; } @Override public int getRemainingPersistentAngerTime() { return 0; } @Override public void setRemainingPersistentAngerTime(int i) { } @Override public @Nullable UUID getPersistentAngerTarget() { return null; } @Override public void setPersistentAngerTarget(@Nullable UUID uuid) { } @Override public void startPersistentAngerTimer() { } protected void playStepSound(BlockPos pos, BlockState blockIn) { this.playSound(SoundEvents.SLIME_SQUISH, 0.15F, 1.0F); } protected SoundEvent getAmbientSound() { return SoundEvents.SLIME_SQUISH; } protected SoundEvent getHurtSound(DamageSource damageSourceIn) { return SoundEvents.SLIME_HURT; } protected SoundEvent getDeathSound() { return SoundEvents.SLIME_DEATH; } protected float getSoundVolume() { return 0.2F; } }  
    • CAN ANYBODY HELP ME? JVM info: Oracle Corporation - 1.8.0_431 - 25.431-b10 java.net.preferIPv4Stack=true Current Time: 15/01/2025 17:45:17 Host: files.minecraftforge.net [104.21.58.163, 172.67.161.211] Host: maven.minecraftforge.net [172.67.161.211, 104.21.58.163] Host: libraries.minecraft.net [127.0.0.1] Host: launchermeta.mojang.com [127.0.0.1] Host: piston-meta.mojang.com [127.0.0.1] Host: sessionserver.mojang.com [127.0.0.1] Host: authserver.mojang.com [Unknown] Error checking https://launchermeta.mojang.com/: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Data kindly mirrored by CreeperHost at https://www.creeperhost.net/ Considering minecraft server jar Downloading libraries Found 1 additional library directories Considering library cpw.mods:securejarhandler:2.1.10   Downloading library from https://maven.creeperhost.net/cpw/mods/securejarhandler/2.1.10/securejarhandler-2.1.10.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm:9.7.1   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm/9.7.1/asm-9.7.1.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-commons:9.7.1   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-commons/9.7.1/asm-commons-9.7.1.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-tree:9.7.1   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-tree/9.7.1/asm-tree-9.7.1.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-util:9.7.1   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-util/9.7.1/asm-util-9.7.1.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-analysis:9.7.1   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-analysis/9.7.1/asm-analysis-9.7.1.jar     Download completed: Checksum validated. Considering library net.minecraftforge:accesstransformers:8.0.4   Downloading library from https://maven.creeperhost.net/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar     Download completed: Checksum validated. Considering library org.antlr:antlr4-runtime:4.9.1   Downloading library from https://maven.creeperhost.net/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar     Download completed: Checksum validated. Considering library net.minecraftforge:eventbus:6.0.5   Downloading library from https://maven.creeperhost.net/net/minecraftforge/eventbus/6.0.5/eventbus-6.0.5.jar     Download completed: Checksum validated. Considering library net.minecraftforge:forgespi:7.0.1   Downloading library from https://maven.creeperhost.net/net/minecraftforge/forgespi/7.0.1/forgespi-7.0.1.jar     Download completed: Checksum validated. Considering library net.minecraftforge:coremods:5.2.1   Downloading library from https://maven.creeperhost.net/net/minecraftforge/coremods/5.2.1/coremods-5.2.1.jar     Download completed: Checksum validated. Considering library cpw.mods:modlauncher:10.0.9   Downloading library from https://maven.creeperhost.net/cpw/mods/modlauncher/10.0.9/modlauncher-10.0.9.jar     Download completed: Checksum validated. Considering library net.minecraftforge:unsafe:0.2.0   Downloading library from https://maven.creeperhost.net/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar     Download completed: Checksum validated. Considering library net.minecraftforge:mergetool:1.1.5:api   Downloading library from https://maven.creeperhost.net/net/minecraftforge/mergetool/1.1.5/mergetool-1.1.5-api.jar     Download completed: Checksum validated. Considering library com.electronwill.night-config:core:3.6.4   Downloading library from https://maven.creeperhost.net/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar     Download completed: Checksum validated. Considering library com.electronwill.night-config:toml:3.6.4   Downloading library from https://maven.creeperhost.net/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar     Download completed: Checksum validated. Considering library org.apache.maven:maven-artifact:3.8.5   Downloading library from https://maven.creeperhost.net/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar     Download completed: Checksum validated. Considering library net.jodah:typetools:0.6.3   Downloading library from https://maven.creeperhost.net/net/jodah/typetools/0.6.3/typetools-0.6.3.jar     Download completed: Checksum validated. Considering library net.minecrell:terminalconsoleappender:1.2.0   Downloading library from https://maven.creeperhost.net/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar     Download completed: Checksum validated. Considering library org.jline:jline-reader:3.12.1   Downloading library from https://maven.creeperhost.net/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar     Download completed: Checksum validated. Considering library org.jline:jline-terminal:3.12.1   Downloading library from https://maven.creeperhost.net/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar     Download completed: Checksum validated. Considering library org.spongepowered:mixin:0.8.5   Downloading library from https://maven.creeperhost.net/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar     Download completed: Checksum validated. Considering library org.openjdk.nashorn:nashorn-core:15.4   Downloading library from https://maven.creeperhost.net/org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar     Download completed: Checksum validated. Considering library net.minecraftforge:JarJarSelector:0.3.19   Downloading library from https://maven.creeperhost.net/net/minecraftforge/JarJarSelector/0.3.19/JarJarSelector-0.3.19.jar     Download completed: Checksum validated. Considering library net.minecraftforge:JarJarMetadata:0.3.19   Downloading library from https://maven.creeperhost.net/net/minecraftforge/JarJarMetadata/0.3.19/JarJarMetadata-0.3.19.jar     Download completed: Checksum validated. Considering library cpw.mods:bootstraplauncher:1.1.2   Downloading library from https://maven.creeperhost.net/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar     Download completed: Checksum validated. Considering library net.minecraftforge:JarJarFileSystems:0.3.19   Downloading library from https://maven.creeperhost.net/net/minecraftforge/JarJarFileSystems/0.3.19/JarJarFileSystems-0.3.19.jar     Download completed: Checksum validated. Considering library net.minecraftforge:fmlloader:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/fmlloader/1.20.1-47.3.12/fmlloader-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library net.minecraftforge:fmlearlydisplay:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/fmlearlydisplay/1.20.1-47.3.12/fmlearlydisplay-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library com.github.jponge:lzma-java:1.3   Downloading library from https://maven.creeperhost.net/com/github/jponge/lzma-java/1.3/lzma-java-1.3.jar     Download completed: Checksum validated. Considering library com.google.code.findbugs:jsr305:3.0.2   Downloading library from https://libraries.minecraft.net/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Failed to establish connection to https://libraries.minecraft.net/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar  Host: libraries.minecraft.net [127.0.0.1] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.ssl.Alert.createSSLException(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(Unknown Source)     at sun.security.ssl.SSLHandshake.consume(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.TransportContext.dispatch(Unknown Source)     at sun.security.ssl.SSLTransport.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)     at java.net.HttpURLConnection.getResponseCode(Unknown Source)     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)     at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:240)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:164)     at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:149)     at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:73)     at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:72)     at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:271)     at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:182)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:154) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.validator.PKIXValidator.doBuild(Unknown Source)     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)     at sun.security.validator.Validator.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)     at java.security.cert.CertPathBuilder.build(Unknown Source)     ... 33 more Considering library com.google.code.gson:gson:2.10.1   Downloading library from https://libraries.minecraft.net/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar Failed to establish connection to https://libraries.minecraft.net/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar  Host: libraries.minecraft.net [127.0.0.1] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.ssl.Alert.createSSLException(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(Unknown Source)     at sun.security.ssl.SSLHandshake.consume(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.TransportContext.dispatch(Unknown Source)     at sun.security.ssl.SSLTransport.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)     at java.net.HttpURLConnection.getResponseCode(Unknown Source)     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)     at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:240)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:164)     at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:149)     at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:73)     at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:72)     at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:271)     at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:182)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:154) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.validator.PKIXValidator.doBuild(Unknown Source)     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)     at sun.security.validator.Validator.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)     at java.security.cert.CertPathBuilder.build(Unknown Source)     ... 33 more Considering library com.google.errorprone:error_prone_annotations:2.1.3   Downloading library from https://maven.creeperhost.net/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar     Download completed: Checksum validated. Considering library com.google.guava:guava:25.1-jre   Downloading library from https://maven.creeperhost.net/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar     Download completed: Checksum validated. Considering library com.google.j2objc:j2objc-annotations:1.1   Downloading library from https://maven.creeperhost.net/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar     Download completed: Checksum validated. Considering library com.nothome:javaxdelta:2.0.1   Downloading library from https://maven.creeperhost.net/com/nothome/javaxdelta/2.0.1/javaxdelta-2.0.1.jar     Download completed: Checksum validated. Considering library commons-io:commons-io:2.4   Downloading library from https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar Failed to establish connection to https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar  Host: libraries.minecraft.net [127.0.0.1] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.ssl.Alert.createSSLException(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(Unknown Source)     at sun.security.ssl.SSLHandshake.consume(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.TransportContext.dispatch(Unknown Source)     at sun.security.ssl.SSLTransport.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)     at java.net.HttpURLConnection.getResponseCode(Unknown Source)     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)     at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:240)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:164)     at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:149)     at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:73)     at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:72)     at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:271)     at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:182)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:154) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.validator.PKIXValidator.doBuild(Unknown Source)     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)     at sun.security.validator.Validator.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)     at java.security.cert.CertPathBuilder.build(Unknown Source)     ... 33 more Considering library de.oceanlabs.mcp:mcp_config:1.20.1-20230612.114412@zip   Downloading library from https://maven.creeperhost.net/de/oceanlabs/mcp/mcp_config/1.20.1-20230612.114412/mcp_config-1.20.1-20230612.114412.zip     Download completed: Checksum validated. Considering library de.siegmar:fastcsv:2.2.2   Downloading library from https://maven.creeperhost.net/de/siegmar/fastcsv/2.2.2/fastcsv-2.2.2.jar     Download completed: Checksum validated. Considering library net.minecraftforge:ForgeAutoRenamingTool:0.1.22:all   Downloading library from https://maven.creeperhost.net/net/minecraftforge/ForgeAutoRenamingTool/0.1.22/ForgeAutoRenamingTool-0.1.22-all.jar     Download completed: Checksum validated. Considering library net.minecraftforge:binarypatcher:1.1.1   Downloading library from https://maven.creeperhost.net/net/minecraftforge/binarypatcher/1.1.1/binarypatcher-1.1.1.jar     Download completed: Checksum validated. Considering library net.minecraftforge:fmlcore:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/fmlcore/1.20.1-47.3.12/fmlcore-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library net.minecraftforge:fmlearlydisplay:1.20.1-47.3.12   File exists: Checksum validated. Considering library net.minecraftforge:fmlloader:1.20.1-47.3.12   File exists: Checksum validated. Considering library net.minecraftforge:forge:1.20.1-47.3.12:universal   Downloading library from https://maven.creeperhost.net/net/minecraftforge/forge/1.20.1-47.3.12/forge-1.20.1-47.3.12-universal.jar     Download completed: Checksum validated. Considering library net.minecraftforge:installertools:1.4.1   Downloading library from https://maven.creeperhost.net/net/minecraftforge/installertools/1.4.1/installertools-1.4.1.jar     Download completed: Checksum validated. Considering library net.minecraftforge:jarsplitter:1.1.4   Downloading library from https://maven.creeperhost.net/net/minecraftforge/jarsplitter/1.1.4/jarsplitter-1.1.4.jar     Download completed: Checksum validated. Considering library net.minecraftforge:javafmllanguage:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/javafmllanguage/1.20.1-47.3.12/javafmllanguage-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library net.minecraftforge:lowcodelanguage:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/lowcodelanguage/1.20.1-47.3.12/lowcodelanguage-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library net.minecraftforge:mclanguage:1.20.1-47.3.12   Downloading library from https://maven.creeperhost.net/net/minecraftforge/mclanguage/1.20.1-47.3.12/mclanguage-1.20.1-47.3.12.jar     Download completed: Checksum validated. Considering library net.minecraftforge:srgutils:0.4.3   Downloading library from https://maven.creeperhost.net/net/minecraftforge/srgutils/0.4.3/srgutils-0.4.3.jar     Download completed: Checksum validated. Considering library net.minecraftforge:srgutils:0.4.9   Downloading library from https://maven.creeperhost.net/net/minecraftforge/srgutils/0.4.9/srgutils-0.4.9.jar     Download completed: Checksum validated. Considering library net.minecraftforge:srgutils:0.5.6   Downloading library from https://maven.creeperhost.net/net/minecraftforge/srgutils/0.5.6/srgutils-0.5.6.jar     Download completed: Checksum validated. Considering library net.sf.jopt-simple:jopt-simple:5.0.4   Downloading library from https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar Failed to establish connection to https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar  Host: libraries.minecraft.net [127.0.0.1] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.ssl.Alert.createSSLException(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.TransportContext.fatal(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(Unknown Source)     at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(Unknown Source)     at sun.security.ssl.SSLHandshake.consume(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)     at sun.security.ssl.TransportContext.dispatch(Unknown Source)     at sun.security.ssl.SSLTransport.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)     at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)     at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)     at java.net.HttpURLConnection.getResponseCode(Unknown Source)     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)     at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:240)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)     at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:164)     at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:149)     at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:73)     at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:72)     at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:271)     at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:182)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:154) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.validator.PKIXValidator.doBuild(Unknown Source)     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)     at sun.security.validator.Validator.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)     at java.security.cert.CertPathBuilder.build(Unknown Source)     ... 33 more Considering library net.sf.jopt-simple:jopt-simple:6.0-alpha-3   Downloading library from https://maven.creeperhost.net/net/sf/jopt-simple/jopt-simple/6.0-alpha-3/jopt-simple-6.0-alpha-3.jar     Download completed: Checksum validated. Considering library org.checkerframework:checker-qual:2.0.0   Downloading library from https://maven.creeperhost.net/org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar     Download completed: Checksum validated. Considering library org.codehaus.mojo:animal-sniffer-annotations:1.14   Downloading library from https://maven.creeperhost.net/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-analysis:9.2   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-analysis/9.2/asm-analysis-9.2.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-commons:9.2   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-commons/9.2/asm-commons-9.2.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-commons:9.6   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-tree:9.2   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-tree/9.2/asm-tree-9.2.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm-tree:9.6   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm:9.2   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm/9.2/asm-9.2.jar     Download completed: Checksum validated. Considering library org.ow2.asm:asm:9.6   Downloading library from https://maven.creeperhost.net/org/ow2/asm/asm/9.6/asm-9.6.jar     Download completed: Checksum validated. Considering library trove:trove:1.0.2   Downloading library from https://maven.creeperhost.net/trove/trove/1.0.2/trove-1.0.2.jar     Download completed: Checksum validated. These libraries failed to download. Try again. com.google.code.findbugs:jsr305:3.0.2 com.google.code.gson:gson:2.10.1 commons-io:commons-io:2.4 net.sf.jopt-simple:jopt-simple:5.0.4 There was an error during installation  
    • Maybe some kind of bug with Pixelmon - something with Raids   Report it to the Creators
    • Did you make changes at the paper-global.yml file?   If not, delete this file and restart the server
    • My friends and I are playing a modified version of BMC4 and we're noticing stuff like passive mobs. (I think) like creatures/animals from Alex mobs, naturalist, let's do nature and even vanilla MC (sheep, cow, pigs, chickens, horses, donkeys) don't really spawn in, unlike the sea creatures and hostile monsters spawn in just fine and normal numbers. Here is a mod list from a crash report: https://pastebin.ubuntu.com/p/K9vJxxx6n4/ Just a quick copy and paste of the mod list from an unrelated crash report If anything please let me know if I should post pics of the mods from my mods folder I want to know how to increase their spawn rate/amount and if there are any mods that are causing the scarce appearances of these mobs
  • Topics

×
×
  • Create New...

Important Information

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