Résolu Faire un compteur de tick (Bar de soif)
-
Pour répondre à diabolicaTrix : j’ai déjà essayé sans succés.
Sinon je suis en avec forge 1.8.9 (forge-1.8.9-11.15.1.1747-mdk) -
Très étrange car pour moi la partie du code concernée est celle ci :
public void func_152657_b() { List list = null; BufferedReader bufferedreader = null; { try { bufferedreader = Files.newReader(this.usercacheFile, Charsets.UTF_8); list = (List)this.gson.fromJson(bufferedreader, field_152666_h); if (list != null) // null check { this.field_152661_c.clear(); this.field_152662_d.clear(); this.field_152663_e.clear(); list = Lists.reverse(list); // NPE Iterator iterator = list.iterator(); …...... }
-
J’ai pas du tout ça, j’ai suivi le tuto de DiabolicaTrix sur utiliser les capabilities.
-
Ce n’est pas ton code qui cause le crash que tu as.
Ton fichier usercache.json est corrompu, supprimes-le (il est dans le dossier forge/run). -
Super, le problème est réglé. J’ai pu faire ceci pour le système de soif, ça fonctionne très bien :
public static int ThirstValue = 86; public static int i = 0; @SubscribeEvent public void playerTick(TickEvent.PlayerTickEvent event) { if (!event.player.capabilities.isCreativeMode) { if (ThirstValue > 0) { i++; if (i == 1000) { ThirstValue–; i = 0; } if (ThirstValue <= 5) { event.player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 200, 0)); } } else { ThirstValue = 0; if (ThirstValue == 0) { event.player.attackEntityFrom(ModSurvivant.damageSourceDehydration, 1.0F); event.player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 200, 0)); } } } }
Maintenant, je voudrais savoir, comment utiliser la capability que j’ai créé, je pense qu’il faut que j’enregistre la valeur avec celle qui est avec la capability mais je ne sais pas laquelle : Celle dans PacketThirstCapabilities ?
Merci par avance. -
public static int ThirstValue = 86; -> ça passe à la trap.
En ensuite dans la fonction playerTick :if(event.player.hasCapability(ModSurvivant.T_CAP, null)) { ThirstCapabilities cap = event.player.getCapability(ModSurvivant.T_CAP, null); //cap.getThirstVal() pour get, cap.setThirstVal(valeur) pour set }
-
Pour le moment j’ai fais ça :
@SubscribeEvent public void playerTick(TickEvent.PlayerTickEvent event) { if (event.player.hasCapability(ModSurvivant.T_CAP, null)) { ThirstCapabilities cap = event.player.getCapability(ModSurvivant.T_CAP, null); ThirstValue = cap.getThirstVal(); i++; if (i == 500) { cap.setThirstVal(cap.getThirstVal()-1); ThirstValue = cap.getThirstVal(); i = 0; } } }
Mais j’ai un souci, en jeu la barre diminue puis remonte instantanément. Je suis contraint de garder ThirstValue car après dans onRenderGameOverlay event.player n’existe pas, j’ai donc mis ceci tout en haut de ma classe :
public static int ThirstValue;
Merci par avance.
-
RenderGameOverlayEvent est un event client, donc utilises Minecraft.getMinecraft().thePlayer pour avoir le joueur.
-
Le gros du système fonctionne maintenant. Cependant, j’ai un petit souci assez gênant : Je n’arrive pas à donner des dégât au joueur quand la barre de soif est vide.
Pourtant j’ai ceci :
event.player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 100, 0)); event.player.attackEntityFrom(ModSurvivant.damageSourceDehydration, 1.0F);
La première ligne de ce code fonctionne mais la deuxième ne veut pas. La source de dégât (damageSourceDeshydratation) que j’ai crée fonctionnait avant, dans ma classe principale j’ai ça :
damageSourceDehydration = new DamageSource("damageSourceDehydration").setDamageBypassesArmor();
Donc normalement en paisible le joueur devrait prendre des dégâts. Même en changeant de difficulté ça ne veut pas et de plus, j’ai essayé en mettant ceci :
event.player.attackEntityFrom(DamageSource.starve, 1.0F);
ça ne fonctionne pas non plus. Bien que la première ligne fonctionne.
Par ailleur, j’ai remarqué quelque chose de bizarre en jeu : Je recommence sans cesse la même journée (même position, même gamemode (survie), même difficulté (paisible), même temps (pluie)) il n’y a que les blocks que je pose qui ne disparaissent pas à la prochaine connection. Est-ce normal ? -
Tu as mis où la ligne
event.player.attackEntityFrom(DamageSource.starve, 1.0F);
?Pour la dernière question, ça serait pas dû au fait que le joueur est différent à chaque lancement ?
-
La fonction ressemble à ça :
@SubscribeEvent public void playerTick(TickEvent.PlayerTickEvent event) { if (event.player.hasCapability(ModSurvivant.T_CAP, null)) { ThirstCapabilities cap = event.player.getCapability(ModSurvivant.T_CAP, null); if (!event.player.capabilities.isCreativeMode) { if (cap.getThirstVal() > 0) { i++; if (i == 250) { cap.setThirstVal(cap.getThirstVal()-1); i = 0; } if (cap.getThirstVal() <= 5) { event.player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 100, 0)); } } else { cap.setThirstVal(0); if (cap.getThirstVal() == 0) { event.player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 100, 0)); event.player.attackEntityFrom(ModSurvivant.damageSourceDehydration, 1.0F); /**Je l'avais mis ici (à la place de cette ligne)*/ } } } } }
Pour la deuxième question : Effectivement j’y avais pas penser, c’est possible.
-
Hormis le fait que tu appliques les dégâts à chaque tick (donc normalement tu es sensé mourir en moins d’une seconde) il ne devrait pas avoir de soucis.
-
Bon alors, event.player.attackEntityFrom(……) fonctionne partout dans la fonction sauf à l’endroit où il faut. J’ai donc essayé de chercher une alternative. En mettant ceci, le joueur meurs quand la barre est à 0:
event.player.setHealth(0);
Le souci c’est qu’une fois mort, j’ai beau appuyer sur le bouton de respawn le joueur ne respawn pas et je reste sur l’écran de game over, seul intermédiaire aller sur le menu principal. Ma question est donc : Comment faire fonctionner dans ce cas le bouton de respawn ?
Merci par avance. -
Il faudrait reset la capacities du joueur non ?
-
Laquelle ?
-
Tu peux mettre un System.out.println(event.player.worldObj.isRemote); dans ton tick event en dessous de event.player.attackEntityFrom(ModSurvivant.damageSourceDehydration, 1.0F); et me dire si tu as seulement true dans la console ou si tu as du true et du false ?
-
Voici ce que me met la console :
2017-04-15 17:49:20,719 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-04-15 17:49:20,724 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [17:49:20] [main/INFO] [GradleStart]: Extra: [] [17:49:21] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/user/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken{REDACTED}, --version, 1.8.9, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [17:49:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [17:49:21] [main/INFO] [FML]: Forge Mod Loader version 11.15.1.1747 for Minecraft 1.8.9 loading [17:49:21] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_121 [17:49:21] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [17:49:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [17:49:21] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [17:49:21] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [17:49:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:49:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:49:21] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [17:49:22] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [17:49:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:49:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:49:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:49:24] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [17:49:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [17:49:24] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2017-04-15 17:49:25,192 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-04-15 17:49:25,250 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-04-15 17:49:25,254 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [17:49:25] [Client thread/INFO]: Setting user: Player116 [17:49:30] [Client thread/INFO]: LWJGL Version: 2.9.4 [17:49:31] [Client thread/WARN] [FML]: ============================================================= [17:49:31] [Client thread/WARN] [FML]: MOD HAS DIRECT REFERENCE System.exit() THIS IS NOT ALLOWED REROUTING TO FML! [17:49:31] [Client thread/WARN] [FML]: Offendor: com/sun/jna/Native.main([Ljava/lang/String;)V [17:49:31] [Client thread/WARN] [FML]: Use FMLCommonHandler.exitJava instead [17:49:31] [Client thread/WARN] [FML]: ============================================================= [17:49:31] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: –-- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 15/04/17 17:49 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.8.9 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_121, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 778329728 bytes (742 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.3621' Renderer: 'Intel(R) HD Graphics 4000' [17:49:32] [Client thread/INFO] [FML]: MinecraftForge v11.15.1.1747 Initialized [17:49:32] [Client thread/INFO] [FML]: Replaced 204 ore recipies [17:49:33] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [17:49:33] [Client thread/INFO] [FML]: Searching C:\Users\user\Desktop\forge-1.8.9-11.15.1.1747-mdk\run\mods for mods [17:49:35] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [17:49:36] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, survivant] at CLIENT [17:49:36] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, survivant] at SERVER [17:49:37] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Survivant [17:49:37] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [17:49:37] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [17:49:37] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [17:49:37] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [17:49:37] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [17:49:37] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [17:49:37] [Client thread/INFO] [FML]: Applying holder lookups [17:49:37] [Client thread/INFO] [FML]: Holder lookups applied [17:49:37] [Client thread/INFO] [FML]: Injecting itemstacks [17:49:37] [Client thread/INFO] [FML]: Itemstack injection complete [17:49:38] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: OUTDATED Target: 11.15.1.1902 [17:49:38] [Sound Library Loader/INFO]: Starting up SoundSystem… [17:49:38] [Thread-9/INFO]: Initializing LWJGL OpenAL [17:49:38] [Thread-9/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:49:39] [Thread-9/INFO]: OpenAL initialized. [17:49:39] [Sound Library Loader/INFO]: Sound engine started [17:49:50] [Client thread/INFO] [FML]: Max texture size: 8192 [17:49:50] [Client thread/INFO]: Created: 16x16 textures-atlas [17:49:51] [Client thread/ERROR] [FML]: Model definition for location survivant:blockBanana#inventory not found [17:49:51] [Client thread/ERROR] [FML]: Model definition for location survivant:blockCoconut#inventory not found [17:49:52] [Client thread/INFO] [FML]: Injecting itemstacks [17:49:52] [Client thread/INFO] [FML]: Itemstack injection complete [17:49:52] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [17:49:52] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Survivant [17:49:52] [Client thread/INFO]: SoundSystem shutting down… [17:49:52] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [17:49:52] [Sound Library Loader/INFO]: Starting up SoundSystem… [17:49:52] [Thread-11/INFO]: Initializing LWJGL OpenAL [17:49:52] [Thread-11/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:49:52] [Thread-11/INFO]: OpenAL initialized. [17:49:52] [Sound Library Loader/INFO]: Sound engine started [17:49:58] [Client thread/INFO] [FML]: Max texture size: 8192 [17:49:59] [Client thread/INFO]: Created: 512x512 textures-atlas [17:50:00] [Client thread/ERROR] [FML]: Model definition for location survivant:blockBanana#inventory not found [17:50:00] [Client thread/ERROR] [FML]: Model definition for location survivant:blockCoconut#inventory not found [17:50:01] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [17:50:06] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [17:50:07] [Server thread/INFO]: Starting integrated minecraft server version 1.8.9 [17:50:07] [Server thread/INFO]: Generating keypair [17:50:07] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:blockCampfire [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:block_potable_water [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:blockManioc [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:block2 [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:blockSurvivalBed [17:50:07] [Server thread/INFO] [FML]: Found a missing id from the world survivant:blockSaltWater [17:50:07] [Server thread/INFO] [FML]: Applying holder lookups [17:50:07] [Server thread/INFO] [FML]: Holder lookups applied [17:50:07] [Server thread/INFO] [FML]: Loading dimension 0 (Mod survivant) (net.minecraft.server.integrated.IntegratedServer@288d9d08) [17:50:07] [Server thread/INFO] [FML]: Loading dimension 1 (Mod survivant) (net.minecraft.server.integrated.IntegratedServer@288d9d08) [17:50:07] [Server thread/INFO] [FML]: Loading dimension -1 (Mod survivant) (net.minecraft.server.integrated.IntegratedServer@288d9d08) [17:50:07] [Server thread/INFO]: Preparing start region for level 0 [17:50:08] [Server thread/INFO]: Preparing spawn area: 88% [17:50:09] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [17:50:09] [Server thread/INFO]: Changing view distance to 12, from 10 [17:50:10] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [17:50:10] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [17:50:10] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@8.0.99.99,Forge@11.15.1.1747,mcp@9.19,survivant@1.0.0 [17:50:10] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [17:50:10] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [17:50:10] [Server thread/INFO]: Player116[local:E:a46d39fa] logged in with entity id 153 at (-77.81369425572345, 4.0, 396.5311220913636) [17:50:10] [Server thread/INFO]: Player116 a rejoint la partie [17:50:12] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@3174488d[id=dfdc5dbd-4a0e-3b6a-a815-601a03741434,name=Player116,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.func_181037_M(Minecraft.java:2915) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:130) [SkinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_121] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_121] at java.lang.Thread.run(Unknown Source) [?:1.8.0_121] [17:50:20] [Server thread/INFO]: [@ : Le temps s'éclaircit] [17:50:20] [Client thread/INFO]: [CHAT] [@ : Le temps s'éclaircit] [17:50:26] [Server thread/INFO]: [Player116 : Changement de votre propre mode de jeu en Mode Créatif] [17:50:26] [Client thread/INFO]: [CHAT] Votre mode de jeu a été mis à jour [17:50:26] [Server thread/INFO]: Player116 vient d'obtenir le succès [Faire l'inventaire] [17:50:26] [Client thread/INFO]: [CHAT] Player116 vient d'obtenir le succès [Faire l'inventaire] [17:50:32] [Server thread/INFO]: [Player116 : Changement de votre propre mode de jeu en Mode Survie] [17:50:32] [Client thread/INFO]: [CHAT] Votre mode de jeu a été mis à jour [17:50:53] [Server thread/WARN]: Failed to save player data for Player116 [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: java.lang.NullPointerException [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:485) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeTag(CompressedStreamTools.java:126) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.write(CompressedStreamTools.java:116) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeCompressed(CompressedStreamTools.java:52) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.storage.SaveHandler.saveWorldInfoWithPlayer(SaveHandler.java:190) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.chunk.storage.AnvilSaveHandler.saveWorldInfoWithPlayer(AnvilSaveHandler.java:44) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveLevel(WorldServer.java:983) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:937) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:427) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:704) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [17:50:53] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at java.lang.Thread.run(Unknown Source) [17:51:38] [Server thread/WARN]: Failed to save player data for Player116 [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: java.lang.NullPointerException [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:485) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeTag(CompressedStreamTools.java:126) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.write(CompressedStreamTools.java:116) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeCompressed(CompressedStreamTools.java:52) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.storage.SaveHandler.saveWorldInfoWithPlayer(SaveHandler.java:190) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.chunk.storage.AnvilSaveHandler.saveWorldInfoWithPlayer(AnvilSaveHandler.java:44) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveLevel(WorldServer.java:983) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:937) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:427) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:704) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [17:51:38] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at java.lang.Thread.run(Unknown Source) true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true [17:52:03] [Server thread/INFO]: Saving and pausing game… [17:52:03] [Server thread/WARN]: Failed to save player data for Player116 [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/Overworld [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: java.lang.NullPointerException [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:485) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeTag(CompressedStreamTools.java:126) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.write(CompressedStreamTools.java:116) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeCompressed(CompressedStreamTools.java:52) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.storage.SaveHandler.saveWorldInfoWithPlayer(SaveHandler.java:190) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.chunk.storage.AnvilSaveHandler.saveWorldInfoWithPlayer(AnvilSaveHandler.java:44) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveLevel(WorldServer.java:983) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:937) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:427) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:144) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at java.lang.Thread.run(Unknown Source) [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/Nether [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/The End [17:52:03] [Server thread/WARN]: Failed to save player data for Player116 [17:52:03] [Server thread/INFO]: Stopping server [17:52:03] [Server thread/INFO]: Saving players [17:52:03] [Server thread/INFO]: Saving worlds [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/Overworld [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: java.lang.NullPointerException [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:485) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:490) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:27) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeTag(CompressedStreamTools.java:126) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.write(CompressedStreamTools.java:116) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.nbt.CompressedStreamTools.writeCompressed(CompressedStreamTools.java:52) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.storage.SaveHandler.saveWorldInfoWithPlayer(SaveHandler.java:190) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.chunk.storage.AnvilSaveHandler.saveWorldInfoWithPlayer(AnvilSaveHandler.java:44) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveLevel(WorldServer.java:983) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:937) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:427) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:462) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:363) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:601) [17:52:03] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.SaveHandler:saveWorldInfoWithPlayer:213]: at java.lang.Thread.run(Unknown Source) [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/Nether [17:52:03] [Server thread/INFO]: Saving chunks for level 'Mod survivant'/The End [17:52:03] [Server thread/INFO] [FML]: Unloading dimension 0 [17:52:03] [Server thread/INFO] [FML]: Unloading dimension -1 [17:52:03] [Server thread/INFO] [FML]: Unloading dimension 1 [17:52:04] [Server thread/INFO] [FML]: Applying holder lookups [17:52:04] [Server thread/INFO] [FML]: Holder lookups applied [17:52:05] [Client thread/INFO]: Stopping! [17:52:05] [Client thread/INFO]: SoundSystem shutting down… [17:52:05] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [17:52:05] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Merci par avance.
-
Que du true, donc ton event TickEvent.PlayerTickEvent n’est que enregistré côté client, ce qui explique à la fois pourquoi attackFrom ne fonctionne pas et setHealth(0) fait tout bugguer.
-
Du coup il faudrait que je mette quoi ?
-
Que tu enregistres ton event aussi côté serveur.