Résolu Un crash avec les Extended Entity Properties
-
Bonjour à tous.
Je vous explique mon cas, j’ais voulue réaliser le tutoriel de gugu42 sur les extended Entity Properties. Le soucis c’est que lorsque je test ma classe le jeu crash.
Code de ma classe avec l’item :
public class CrystalVie extends Item{ public long L; public ItemStack onItemRightClick(ItemStack Stack,World world,EntityPlayer player) { ExtendVieLv props = ExtendVieLv.get(player); L=1; if (props.Check(L) ) { player.addChatMessage(new ChatComponentText("Ca marche !!!!!!!!!")); } else { } return super.onItemRightClick(Stack,world,player);} public void addInformation(ItemStack Stack, EntityPlayer player, List lsort2,boolean bobo) { Stack.stackTagCompound = new NBTTagCompound(); Stack.stackTagCompound.getString(""); lsort2.add("Augmente la vie maximal dans la limite du mod"); lsort2.add("mod en alpha 1.2"); lsort2.add("Limite : 3 lignes de coeurs"); } }
Ma class avec “implements IExtendedEntityProperties”
public class ExtendVieLv implements IExtendedEntityProperties{ public final static String EXT_Vie = "PropVie"; private EntityPlayer player; public String Lv; public long LevelV; public ExtendVieLv(EntityPlayer player) { this.player = player; this.Lv = ""; this.LevelV = 0; } public static final void register(EntityPlayer player) { player.registerExtendedProperties(ExtendVieLv.EXT_Vie,new ExtendVieLv(player));} public static final ExtendVieLv get(EntityPlayer player) { return (ExtendVieLv) player.getExtendedProperties(EXT_Vie); } @Override public void saveNBTData(NBTTagCompound compound) { NBTTagCompound properties = new NBTTagCompound(); properties.setLong("NiveauxVie", this.LevelV); compound.setTag(EXT_Vie, properties); } @Override public void loadNBTData(NBTTagCompound compound) { NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_Vie); this.LevelV = properties.getLong("NiveauxVie"); } public final void sync() { if (LevelV == 0){this.Lv = "0";} MyMessage packetMoney = new MyMessage(this.Lv); Main.network.sendToServer(packetMoney); if (!player.worldObj.isRemote) { EntityPlayerMP player1 = (EntityPlayerMP) player; Main.network.sendTo(packetMoney, player1); if (LevelV == 0){this.Lv = "0";} } return; } private static String getSaveKey(EntityPlayer player) { return player.getDisplayName() + ":" + EXT_Vie; } public static void saveProxyData(EntityPlayer player) { ExtendVieLv playerData = ExtendVieLv.get(player); NBTTagCompound savedData = new NBTTagCompound(); playerData.saveNBTData(savedData); CommonProxy.storeEntityData(getSaveKey(player), savedData); } public static void loadProxyData(EntityPlayer player) { ExtendVieLv playerData = ExtendVieLv.get(player); NBTTagCompound savedData = CommonProxy.getEntityData(getSaveKey(player)); if (savedData != null) { playerData.loadNBTData(savedData); } playerData.sync(); } public boolean Check(long L) { if (L == 1){ player.addChatMessage(new ChatComponentText("Le check marche"));; } return true; } @Override public void init(Entity entity, World world) {} }
Le rapport de crash :
[16:35:39] [main/INFO] [GradleStart]: Extra: [] [16:35:39] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/yves/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [16:35:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [16:35:39] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading [16:35:39] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_91, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_91 [16:35:39] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [16:35:39] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [16:35:39] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [16:35:39] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [16:35:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:35:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:35:39] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [16:35:42] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [16:35:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:35:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:35:43] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [16:35:43] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [16:35:43] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [16:35:43] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [16:35:45] [main/INFO]: Setting user: Player797 [16:35:48] [Client thread/INFO]: LWJGL Version: 2.9.1 [16:35:50] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ---- // You're mean. Time: 26/06/16 16:35 Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 796544264 bytes (759 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 0, tallocated: 0 FML: GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 353.54' Renderer: 'GeForce 840M/PCIe/SSE2' [16:35:50] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [16:35:50] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized [16:35:50] [Client thread/INFO] [FML]: Replaced 183 ore recipies [16:35:50] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [16:35:50] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [16:35:50] [Client thread/INFO] [FML]: Searching C:\Users\yves\Desktop\mod exta\forge\eclipse\mods for mods [16:35:59] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [16:36:00] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, extaziliamod] at CLIENT [16:36:00] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, extaziliamod] at SERVER [16:36:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Extazilia Mod [16:36:00] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [16:36:00] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [16:36:00] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [16:36:00] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [16:36:00] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [16:36:00] [Client thread/INFO] [FML]: Applying holder lookups [16:36:00] [Client thread/INFO] [FML]: Holder lookups applied [16:36:00] [Client thread/INFO] [FML]: Injecting itemstacks [16:36:00] [Client thread/INFO] [FML]: Itemstack injection complete [16:36:00] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:00] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [16:36:01] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:36:01] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:36:01] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:36:01] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:01] [Sound Library Loader/INFO]: Sound engine started [16:36:03] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas [16:36:03] [Client thread/INFO]: Created: 16x16 textures/items-atlas [16:36:03] [Client thread/INFO] [STDOUT]: [fr.extazilia.extaziliamod.proxy.ClientProxy:registerRender:32]: &4test client [16:36:03] [Client thread/INFO] [FML]: Injecting itemstacks [16:36:03] [Client thread/INFO] [FML]: Itemstack injection complete [16:36:04] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [16:36:04] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Extazilia Mod [16:36:04] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [16:36:04] [Client thread/INFO]: Created: 512x256 textures/items-atlas [16:36:04] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:04] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [16:36:05] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [16:36:05] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:05] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:05] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [16:36:05] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:36:05] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:36:05] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:36:05] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:36:05] [Sound Library Loader/INFO]: Sound engine started [16:36:12] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [16:36:12] [Server thread/INFO]: Generating keypair [16:36:12] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [16:36:12] [Server thread/INFO] [FML]: Applying holder lookups [16:36:12] [Server thread/INFO] [FML]: Holder lookups applied [16:36:12] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@ba9f4c1) [16:36:12] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@ba9f4c1) [16:36:12] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@ba9f4c1) [16:36:12] [Server thread/INFO]: Preparing start region for level 0 [16:36:13] [Server thread/INFO]: Preparing spawn area: 78% [16:36:14] [Server thread/INFO]: Changing view distance to 12, from 10 [16:36:14] [Netty Client IO #0/INFO] [FML]: Server protocol version 2 [16:36:14] [Netty IO #1/INFO] [FML]: Client protocol version 2 [16:36:14] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : extaziliamod@1.2,FML@7.10.99.99,Forge@10.13.4.1614,mcp@9.05 [16:36:14] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [16:36:14] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [16:36:14] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [16:36:14] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [16:36:14] [Server thread/INFO]: Player797[local:E:1cace047] logged in with entity id 305 at (395.46071596326715, 83.0, 258.42505934073733) [16:36:14] [Server thread/INFO]: Player797 joined the game [16:36:21] [Server thread/INFO]: Saving and pausing game… [16:36:21] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [16:36:22] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [16:36:22] [Server thread/INFO]: Saving chunks for level 'New World'/The End [16:36:23] [Client thread/INFO]: [CHAT] [INFO]utilise l'item ou offre le [16:36:24] [Server thread/INFO]: Stopping server [16:36:24] [Server thread/INFO]: Saving players [16:36:24] [Server thread/INFO]: Saving worlds [16:36:24] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [16:36:24] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [16:36:24] [Server thread/INFO]: Saving chunks for level 'New World'/The End [16:36:25] [Server thread/INFO] [FML]: Unloading dimension 0 [16:36:25] [Server thread/INFO] [FML]: Unloading dimension -1 [16:36:25] [Server thread/INFO] [FML]: Unloading dimension 1 [16:36:25] [Server thread/INFO] [FML]: Applying holder lookups [16:36:25] [Server thread/INFO] [FML]: Holder lookups applied [16:36:25] [Client thread/FATAL]: Unreported exception thrown! java.lang.NullPointerException at fr.extazilia.extaziliamod.common.CrystalVie.onItemRightClick(CrystalVie.java:26) ~[CrystalVie.class:?] at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) ~[ItemStack.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:430) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2044) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [16:36:25] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // Oh - I know what I did wrong! Time: 26/06/16 16:36 Description: Unexpected error java.lang.NullPointerException: Unexpected error at fr.extazilia.extaziliamod.common.CrystalVie.onItemRightClick(CrystalVie.java:26) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:430) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2044) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.extazilia.extaziliamod.common.CrystalVie.onItemRightClick(CrystalVie.java:26) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:430) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player797'/305, l='MpServer', x=396,01, y=84,62, z=257,97]] Chunk stats: MultiplayerChunkCache: 621, 621 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (248,64,248), Chunk: (at 8,4,8 in 15,15; contains blocks 240,0,240 to 255,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 61857 game time, 61857 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 98 total; [EntitySheep['Sheep'/256, l='MpServer', x=364,28, y=67,00, z=268,50], EntityCreeper['Creeper'/257, l='MpServer', x=355,44, y=23,00, z=286,50], EntityCreeper['Creeper'/258, l='MpServer', x=352,94, y=23,00, z=291,50], EntitySkeleton['Skeleton'/264, l='MpServer', x=383,50, y=16,00, z=245,31], EntityCreeper['Creeper'/265, l='MpServer', x=383,50, y=64,00, z=253,41], EntityBat['Bat'/266, l='MpServer', x=386,45, y=13,00, z=276,16], EntityBat['Bat'/267, l='MpServer', x=378,59, y=17,97, z=268,25], EntityEnderman['Enderman'/268, l='MpServer', x=396,84, y=16,00, z=304,38], EntityCreeper['Creeper'/524, l='MpServer', x=369,50, y=68,00, z=237,50], EntitySkeleton['Skeleton'/269, l='MpServer', x=374,44, y=13,00, z=300,66], EntityZombie['Zombie'/270, l='MpServer', x=378,16, y=13,00, z=301,59], EntitySkeleton['Skeleton'/526, l='MpServer', x=354,53, y=23,00, z=283,52], EntityCreeper['Creeper'/271, l='MpServer', x=368,50, y=29,00, z=303,50], EntitySkeleton['Skeleton'/527, l='MpServer', x=353,50, y=23,00, z=283,50], EntityCreeper['Creeper'/272, l='MpServer', x=370,00, y=29,00, z=298,50], EntitySkeleton['Skeleton'/528, l='MpServer', x=356,50, y=23,00, z=282,50], EntityZombie['Zombie'/273, l='MpServer', x=378,50, y=24,00, z=301,50], EntitySkeleton['Skeleton'/274, l='MpServer', x=374,13, y=29,00, z=298,44], EntityZombie['Zombie'/275, l='MpServer', x=363,84, y=67,00, z=313,36], EntityCreeper['Creeper'/277, l='MpServer', x=387,78, y=64,00, z=254,53], EntitySkeleton['Skeleton'/278, l='MpServer', x=384,69, y=65,01, z=252,37], EntityBat['Bat'/279, l='MpServer', x=383,50, y=13,08, z=267,83], EntityCreeper['Creeper'/280, l='MpServer', x=391,00, y=64,00, z=256,56], EntityBat['Bat'/281, l='MpServer', x=383,42, y=13,88, z=279,70], EntitySkeleton['Skeleton'/282, l='MpServer', x=399,50, y=16,00, z=304,50], EntitySheep['Sheep'/283, l='MpServer', x=393,94, y=63,00, z=305,91], EntitySquid['Squid'/288, l='MpServer', x=416,44, y=47,34, z=206,38], EntitySheep['Sheep'/289, l='MpServer', x=405,34, y=64,00, z=247,50], EntitySheep['Sheep'/290, l='MpServer', x=411,47, y=67,00, z=310,81], EntityCreeper['Creeper'/292, l='MpServer', x=428,50, y=14,00, z=188,50], EntityCreeper['Creeper'/293, l='MpServer', x=424,03, y=20,00, z=185,44], EntityZombie['Zombie'/298, l='MpServer', x=444,97, y=25,00, z=200,69], EntitySquid['Squid'/299, l='MpServer', x=438,06, y=50,38, z=197,84], EntityClientPlayerMP['Player797'/305, l='MpServer', x=396,01, y=84,62, z=257,97], EntityItem['item.item.sulphur'/307, l='MpServer', x=459,88, y=12,13, z=248,66], EntityItem['item.item.arrow'/308, l='MpServer', x=459,91, y=12,13, z=248,88], EntitySkeleton['Skeleton'/309, l='MpServer', x=457,50, y=17,00, z=244,13], EntityBat['Bat'/310, l='MpServer', x=452,80, y=32,81, z=265,94], EntityCreeper['Creeper'/314, l='MpServer', x=470,44, y=14,00, z=245,00], EntityBat['Bat'/315, l='MpServer', x=468,25, y=14,10, z=251,25], EntityCreeper['Creeper'/318, l='MpServer', x=474,50, y=22,00, z=245,50], EntitySkeleton['Skeleton'/320, l='MpServer', x=467,50, y=23,00, z=281,50], EntitySkeleton['Skeleton'/321, l='MpServer', x=467,50, y=23,00, z=279,50], EntityBat['Bat'/322, l='MpServer', x=472,53, y=24,10, z=272,50], EntityZombie['Zombie'/323, l='MpServer', x=476,50, y=22,00, z=237,50], EntityBat['Bat'/324, l='MpServer', x=474,75, y=17,10, z=227,75], EntityBat['Bat'/325, l='MpServer', x=474,35, y=16,58, z=235,44], EntityZombie['Zombie'/326, l='MpServer', x=464,06, y=31,00, z=294,50], EntityEnderman['Enderman'/327, l='MpServer', x=460,50, y=45,00, z=321,50], EntityZombie['Zombie'/338, l='MpServer', x=465,50, y=45,00, z=321,00], EntityBat['Bat'/339, l='MpServer', x=469,57, y=38,73, z=333,50], EntitySpider['Spider'/204, l='MpServer', x=318,84, y=71,00, z=257,22], EntitySkeleton['Skeleton'/208, l='MpServer', x=322,44, y=19,00, z=326,07], EntityZombie['Zombie'/209, l='MpServer', x=335,22, y=26,00, z=189,31], EntityZombie['Zombie'/210, l='MpServer', x=333,13, y=26,00, z=190,44], EntityCreeper['Creeper'/211, l='MpServer', x=334,31, y=26,00, z=189,91], EntityCreeper['Creeper'/212, l='MpServer', x=331,50, y=26,00, z=190,50], EntityEnderman['Enderman'/213, l='MpServer', x=332,31, y=49,00, z=219,78], EntitySkeleton['Skeleton'/214, l='MpServer', x=333,13, y=28,00, z=236,50], EntitySkeleton['Skeleton'/215, l='MpServer', x=327,50, y=28,00, z=232,50], EntitySkeleton['Skeleton'/216, l='MpServer', x=327,44, y=45,00, z=238,94], EntityPig['Pig'/217, l='MpServer', x=333,47, y=70,00, z=280,09], EntityPig['Pig'/218, l='MpServer', x=327,84, y=72,00, z=280,03], EntitySkeleton['Skeleton'/219, l='MpServer', x=331,53, y=15,00, z=318,91], EntityCreeper['Creeper'/220, l='MpServer', x=328,94, y=22,00, z=312,28], EntitySkeleton['Skeleton'/221, l='MpServer', x=332,50, y=15,00, z=322,50], EntityPig['Pig'/222, l='MpServer', x=333,84, y=66,00, z=325,41], EntityPig['Pig'/223, l='MpServer', x=331,94, y=69,00, z=322,88], EntitySpider['Spider'/226, l='MpServer', x=343,41, y=21,00, z=192,78], EntityZombie['Zombie'/227, l='MpServer', x=337,41, y=25,00, z=191,03], EntityEnderman['Enderman'/228, l='MpServer', x=346,25, y=21,00, z=195,59], EntityBat['Bat'/229, l='MpServer', x=349,52, y=24,00, z=189,29], EntitySpider['Spider'/230, l='MpServer', x=339,63, y=20,00, z=250,72], EntitySkeleton['Skeleton'/231, l='MpServer', x=344,50, y=22,00, z=253,50], EntityCreeper['Creeper'/232, l='MpServer', x=336,59, y=20,00, z=244,97], EntityEnderman['Enderman'/233, l='MpServer', x=351,94, y=21,00, z=265,34], EntityZombie['Zombie'/234, l='MpServer', x=351,50, y=27,00, z=285,84], EntityCreeper['Creeper'/235, l='MpServer', x=351,44, y=23,00, z=287,00], EntityPig['Pig'/236, l='MpServer', x=336,03, y=69,00, z=275,03], EntityCreeper['Creeper'/237, l='MpServer', x=348,25, y=65,00, z=285,59], EntityCreeper['Creeper'/238, l='MpServer', x=350,50, y=29,00, z=299,50], EntitySkeleton['Skeleton'/239, l='MpServer', x=347,78, y=23,00, z=295,69], EntityCreeper['Creeper'/240, l='MpServer', x=350,50, y=23,00, z=298,00], EntitySkeleton['Skeleton'/241, l='MpServer', x=348,50, y=34,00, z=295,50], EntitySkeleton['Skeleton'/242, l='MpServer', x=342,50, y=24,00, z=305,50], EntityBat['Bat'/243, l='MpServer', x=348,50, y=19,32, z=317,46], EntityPig['Pig'/244, l='MpServer', x=354,53, y=68,95, z=302,69], EntityPig['Pig'/245, l='MpServer', x=341,38, y=68,00, z=322,06], EntityPig['Pig'/246, l='MpServer', x=332,97, y=66,00, z=328,91], EntityBat['Bat'/247, l='MpServer', x=362,45, y=14,04, z=183,36], EntityZombie['Zombie'/248, l='MpServer', x=354,50, y=25,00, z=187,50], EntityChicken['Chicken'/249, l='MpServer', x=354,53, y=62,47, z=217,53], EntityChicken['Chicken'/250, l='MpServer', x=364,44, y=62,47, z=220,56], EntityItem['item.item.egg'/251, l='MpServer', x=365,09, y=53,13, z=218,63], EntityChicken['Chicken'/252, l='MpServer', x=361,38, y=67,00, z=233,47], EntityChicken['Chicken'/253, l='MpServer', x=362,56, y=70,00, z=238,47], EntityItem['item.item.egg'/254, l='MpServer', x=358,44, y=71,13, z=241,16], EntityBat['Bat'/255, l='MpServer', x=364,93, y=16,81, z=257,60]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:991) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 798255720 bytes (761 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) UCHIJAAAA extaziliamod{1.2} [Extazilia Mod] (bin) GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 353.54' Renderer: 'GeForce 840M/PCIe/SSE2' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce 840M/PCIe/SSE2 GL version 4.5.0 NVIDIA 353.54, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) [16:36:25] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\yves\Desktop\mod exta\forge\eclipse\.\crash-reports\crash-2016-06-26_16.36.25-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Merci d’avance pour votre aide ^^
[size=largeMExtended Entity Properties][size=largeExtended Entity Properties][size=largeExtended Entity Properties]
-
Dans ton Crystal vie, lorsque tu récupère ton EPP, ici ```java
ExtendVieLv props = ExtendVieLv.get(player);props est null, et entraine un NPE lorsque tu fait ```java props.Check(L)
-
@‘BrokenSwing’:
Dans ton Crystal vie, lorsque tu récupère ton EPP, ici ```java
ExtendVieLv props = ExtendVieLv.get(player);props est null, et entraine un NPE lorsque tu fait ```java props.Check(L)
Aurais tu une idée pour résoudre ca car je vois pourquoi props serait null dans ce cas la ><
-
Il faut l’enregistrer avec l’event EntityConstructingEvent
-
@‘robin4002’:
Il faut l’enregistrer avec l’event EntityConstructingEvent
Ma classe d’event :
public class EventHardler { @SubscribeEvent public void onEntityConstructing(EntityConstructing event) { if (event.entity instanceof EntityPlayer&& ExtendVieLv.get((EntityPlayer) event.entity) == null) ExtendVieLv.register((EntityPlayer) event.entity);} @SubscribeEvent public void onLivingDeathEvent(LivingDeathEvent event) { if (!event.entity.worldObj.isRemote&& event.entity instanceof EntityPlayer) { NBTTagCompound playerData = new NBTTagCompound(); ((ExtendVieLv) (event.entity.getExtendedProperties(ExtendVieLv.EXT_Vie))).saveNBTData(playerData); CommonProxy.storeEntityData(((EntityPlayer) event.entity).getDisplayName(), playerData); ExtendVieLv.saveProxyData((EntityPlayer) event.entity);} else {} } @SubscribeEvent public void onEntityJoinWorld(EntityJoinWorldEvent event) { if (!event.entity.worldObj.isRemote&& event.entity instanceof EntityPlayer) { NBTTagCompound playerData = CommonProxy.getEntityData(((EntityPlayer) event.entity).getDisplayName()); if (playerData != null) { ((ExtendVieLv) (event.entity.getExtendedProperties(ExtendVieLv.EXT_Vie))).loadNBTData(playerData);} ((ExtendVieLv) (event.entity.getExtendedProperties(ExtendVieLv.EXT_Vie))).sync();}}}
Ma déclaration :
FMLCommonHandler.instance().bus().register(new EventHardler());
-
Met aussi celui-ci
MinecraftForge.EVENT_BUS.register(new EventHardler());
-
@‘BrokenSwing’:
Met aussi celui-ci
MinecraftForge.EVENT_BUS.register(new EventHardler());
Merci beaucoup mon erreur est régler maintenant je pensais pas que c’était des event de forge.
-
Regarde le package, si il y a fml dans le package c’est fml, et si il ny est pas c’est forge, ou alors regarde ici http://www.minecraftforgefrance.fr/forge-events.php c’est marqué dans la dernière colonne (Bus)
-
@‘BrokenSwing’:
Regarde le package, si il y a fml dans le package c’est fml, et si il ny est pas c’est forge, ou alors regarde ici http://www.minecraftforgefrance.fr/forge-events.php c’est marqué dans la dernière colonne (Bus)
Merci pour le lien il me servira surement :3
-
Je précise que depuis la 1.8.9 c’est uniquement via Forge (fml fonctionne aussi mais est déprécié)
Envoyé de mon RAINBOW LITE 4G en utilisant Tapatalk
-
Je précise qu’il est en 1.7 xD
-
Oui mais c’est juste pour préciser ^^
(Et sur tapatalk on voit pas les balises).Envoyé de mon RAINBOW LITE 4G en utilisant Tapatalk