Résolu Est-il Op?
-
Bonjour,
Donc j’ai commencé dans la shoutbox et je fini ici. J’ai un gui qui s’ouvre quand on vise un joueur et qu’on appuie sur la touche définie par le joueur.
Je voudrais que ce gui change si le joueur est OP, mais je n’ai pas trouvé la fonction, du moins Blackout m’a donné ça: MinecraftServer.getServer().getConfigurationManager().func_152596_g(((EntityPlayer)sender).getGameProfile())
Mais puisque je n’utilise pas une commande pour ouvrir le gui, je n’ai pas de “sender” .
-
La vérification des permissions et de la visée se fait toujours coté serveur.
Tu dois donc intercepter ces événements coté serveur, vérifier que le joueur est OP et si c’est le cas, lui envoyer un paquet avec les données que tu veux afficher dans le GUI.Coté client, dès que tu reçois le paquet, tu ouvre le GUI OP avec les données du paquet.
-
Pour la visée je n’ai aucunement eu recours aux paquets, sinon pour le reste je ne vois pas trop comment je pourrais faire ça.
Edit: je n’avais pas lu ton message dans la shoutbox, je vais essayer quelque chose.
-
Si tu calcules la visé coté client, n’importe quel cheater pourra rendre ton mods unfair.
Je t’invite a lire ce tutoriel sur le network, il est valable pour les versions supérieures ou égales a la 1.7.2
http://www.minecraftforgefrance.fr/showthread.php?tid=1118La détection des touches se fait coté client, donc tu va devoir envoyé un paquet au serveur lorsque le client appuie sur cette touche. Lorsque le serveur reçoit le paquet, il vérifie la visé et le statut du joueur (Op ou non), en fonction de quoi il envoie u paquet au client. Lorsque le client reçoit le paquet, il ouvre le GUI et affiche les données du paquet.
-
Je ne suis pas sur de comprendre ce que le cheat a à voir avec ça:
public void onKeyInput(KeyInputEvent event) { if (ClientProxy.overMouse.isPressed()) { if (Minecraft.getMinecraft().objectMouseOver.entityHit instanceof EntityLiving) { Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver()); } } }
-
@‘DiabolicaTrix’:
Je ne suis pas sur de comprendre ce que le cheat a à voir avec ça:
public void onKeyInput(KeyInputEvent event) { if (ClientProxy.overMouse.isPressed()) { if (Minecraft.getMinecraft().objectMouseOver.entityHit instanceof EntityLiving) { Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver()); } } }
Qu’est ce qui m’empêche de faire un mod avec le code suivant :
public void onKeyInput(KeyInputEvent event) { if (ClientProxy.overMouse.isPressed()) { Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver()); } }
Comme ça, je n’ai pas besoin de voir l’entité pour afficher ton GUI.
Après ça dépend ce que tu affiches dans ton GUI en réalité.
Tu veux afficher quoi exactement ? -
J’affiche un menu qui offre des options d’interaction du genre: trade.
-
D’accord, si c’est uniquement un menu d’option et si la visé n’est pas un élement clé du gameplay mais juste un élément ergonomique, tu n’est pas obliger de passer par une vérification de la visé coté serveur.
Par contre, tu dois passer par le serveur pour savoir si le joueur est OP ou non, car ces informations sont stockées coté serveur.
Donc tu va forcément devoir passer par des paquets, je ne pense pas qu’il existe une fonction coté client pour savoir si un joueur est OP ou non.N’oublis pas de prendre en compte dans la suite du développement de ton mod qu’un joueur qui a ton GUI d’ouvert n’est pas forcément OP et peut se trouver a l’autre bout du monde minecraft.
-
Tu peux aussi utiliser MinecraftServer.getServer().getConfigurationManager().canSendCommands(player.getGameProfile());
Par contre en effet ce genre ce vérification se fond côté serveur obligatoirement. Donc il faut deux paquets, un que le client envoie au serveur, dans l’action de ce paquet tu vérifies que le joueur est op, si oui dans le return tu mets ton deuxième paquet qui va être envoyé au client sinon tu mets null. Et dans l’action du second paquet tu mets le code pour ouvrir le gui.
-
@Blackout mais puisque c’est un gui d’interaction… même si il l’ouvre à distance il n’aura sélectionné personne…
@robin4002 ok j’vais voir ça elle fonction comme l’autre fonction?
-
C’est un boolean donc tu peux le mettre directement dans un if.
-
Mon jeu crash toujours:
# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x53b9de7a, pid=686432, tid=686700 # # JRE version: Java(TM) SE Runtime Environment (8.0_45-b15) (build 1.8.0_45-b15) # Java VM: Java HotSpot(TM) Client VM (25.45-b02 mixed mode windows-x86 ) # Problematic frame: # C [OpenAL32.dll+0xde7a] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # –------------- T H R E A D --------------- Current thread (0x55584c00): JavaThread "Thread-8" [_thread_in_native, id=686700, stack(0x53ab0000,0x53b00000)] siginfo: ExceptionCode=0xc0000005, reading address 0x4f8d3004 Registers: EAX=0x4f8d3004, EBX=0x00000001, ECX=0x53dc0050, EDX=0x000d6000 ESP=0x53aff2c8, EBP=0x53aff2f8, ESI=0x53dc0050, EDI=0x4f8d2e4c EIP=0x53b9de7a, EFLAGS=0x00010202 Top of Stack: (sp=0x53aff2c8) 0x53aff2c8: 00000001 53dc0050 000003ec 0252be6c 0x53aff2d8: 000000ff 53dc0050 5399b200 53aff30c 0x53aff2e8: 00000004 0000ac44 0000006e 5399b200 0x53aff2f8: 53aff30c 53b9ef0d 55584c00 5399b200 0x53aff308: 5399b200 53aff360 484e5aa0 53dc0050 0x53aff318: 4f8d2e4c 024f1be1 55584d40 53aff368 0x53aff328: 53dc0050 00000000 4f8d2e4c 00000000 0x53aff338: 5399b200 024f1796 53aff340 5399b200 Instructions: (pc=0x53b9de7a) 0x53b9de5a: 02 8b d9 2b cb 89 4d e0 81 fa 03 00 02 00 75 06 0x53b9de6a: 8b 40 04 89 45 f0 83 45 f8 02 8b 45 f8 8d 04 87 0x53b9de7a: 83 38 00 75 b3 8d 45 f4 50 68 7c e8 bc 53 6a 00 0x53b9de8a: e8 6a 4e 00 00 b8 40 1f 00 00 83 c4 0c 39 45 f4 Register to memory mapping: EAX=0x4f8d3004 is an unknown value EBX=0x00000001 is an unknown value ECX=0x53dc0050 is an unknown value EDX=0x000d6000 is an unknown value ESP=0x53aff2c8 is pointing into the stack for thread: 0x55584c00 EBP=0x53aff2f8 is pointing into the stack for thread: 0x55584c00 ESI=0x53dc0050 is an unknown value EDI=0x4f8d2e4c is an unknown value Stack: [0x53ab0000,0x53b00000], sp=0x53aff2c8, free space=316k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [OpenAL32.dll+0xde7a] C [OpenAL32.dll+0xef0d] C [lwjgl.dll+0x5aa0] j org.lwjgl.openal.ALC10.alcCreateContext(Lorg/lwjgl/openal/ALCdevice;Ljava/nio/IntBuffer;)Lorg/lwjgl/openal/ALCcontext;+8 j org.lwjgl.openal.AL.init(Ljava/lang/String;IIZZ)V+69 j org.lwjgl.openal.AL.create(Ljava/lang/String;IIZZ)V+227 j org.lwjgl.openal.AL.create(Ljava/lang/String;IIZ)V+5 j org.lwjgl.openal.AL.create()V+6 j paulscode.sound.libraries.LibraryLWJGLOpenAL.init()V+2 j paulscode.sound.SoundSystem.CommandNewLibrary(Ljava/lang/Class;)V+273 j paulscode.sound.SoundSystem.CommandQueue(Lpaulscode/sound/CommandObject;)Z+1206 j paulscode.sound.CommandThread.run()V+51 v ~StubRoutines::call_stub V [jvm.dll+0x155cb5] V [jvm.dll+0x21b12e] V [jvm.dll+0x155d4e] V [jvm.dll+0x155ed6] V [jvm.dll+0x155f47] V [jvm.dll+0xfb0cf] V [jvm.dll+0x17901c] V [jvm.dll+0x17910a] V [jvm.dll+0x1bd6e6] C [msvcr100.dll+0x5c556] C [msvcr100.dll+0x5c600] C [KERNEL32.DLL+0x17c04] C [ntdll.dll+0x5ad1f] C [ntdll.dll+0x5acea] C 0x00000000 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.lwjgl.openal.ALC10.nalcCreateContext(JJ)J+0 j org.lwjgl.openal.ALC10.alcCreateContext(Lorg/lwjgl/openal/ALCdevice;Ljava/nio/IntBuffer;)Lorg/lwjgl/openal/ALCcontext;+8 j org.lwjgl.openal.AL.init(Ljava/lang/String;IIZZ)V+69 j org.lwjgl.openal.AL.create(Ljava/lang/String;IIZZ)V+227 j org.lwjgl.openal.AL.create(Ljava/lang/String;IIZ)V+5 j org.lwjgl.openal.AL.create()V+6 j paulscode.sound.libraries.LibraryLWJGLOpenAL.init()V+2 j paulscode.sound.SoundSystem.CommandNewLibrary(Ljava/lang/Class;)V+273 j paulscode.sound.SoundSystem.CommandQueue(Lpaulscode/sound/CommandObject;)Z+1206 j paulscode.sound.CommandThread.run()V+51 v ~StubRoutines::call_stub –------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x5310e400 JavaThread "Thread-9" [_thread_blocked, id=686768, stack(0x4ea60000,0x4eab0000)] 0x52a5cc00 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=686704, stack(0x53b40000,0x53b90000)] =>0x55584c00 JavaThread "Thread-8" [_thread_in_native, id=686700, stack(0x53ab0000,0x53b00000)] 0x4f6f0400 JavaThread "Sound Library Loader" [_thread_blocked, id=686516, stack(0x53920000,0x53970000)] 0x47abd000 JavaThread "LWJGL Timer" daemon [_thread_blocked, id=686388, stack(0x4e5d0000,0x4e620000)] 0x476f8400 JavaThread "Thread-6" [_thread_blocked, id=686280, stack(0x4e540000,0x4e590000)] 0x47b23400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=686964, stack(0x48ba0000,0x48bf0000)] 0x46522800 JavaThread "Timer hack thread" daemon [_thread_blocked, id=684100, stack(0x48710000,0x48760000)] 0x47a5dc00 JavaThread "Snooper Timer" daemon [_thread_blocked, id=686240, stack(0x48570000,0x485c0000)] 0x46525c00 JavaThread "Service Thread" daemon [_thread_blocked, id=685692, stack(0x47310000,0x47360000)] 0x46501800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=679024, stack(0x47280000,0x472d0000)] 0x464f5c00 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=686916, stack(0x471f0000,0x47240000)] 0x464f4c00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=685040, stack(0x46e40000,0x46e90000)] 0x464f1800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=684912, stack(0x46db0000,0x46e00000)] 0x464ec800 JavaThread "Attach Listener" daemon [_thread_blocked, id=685880, stack(0x46d20000,0x46d70000)] 0x464ebc00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=685068, stack(0x46c90000,0x46ce0000)] 0x464eb000 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=686564, stack(0x46c00000,0x46c50000)] 0x464c6000 JavaThread "Finalizer" daemon [_thread_blocked, id=685104, stack(0x46b70000,0x46bc0000)] 0x464bdc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=675960, stack(0x46ae0000,0x46b30000)] 0x023e2800 JavaThread "Client thread" [_thread_in_native, id=686484, stack(0x00b30000,0x00b80000)] Other Threads: 0x464bb800 VMThread [stack: 0x46a50000,0x46aa0000] [id=685420] 0x4652d800 WatcherThread [stack: 0x473a0000,0x473f0000] [id=686920] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap: par new generation total 235968K, used 172956K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 69% used [0x04800000, 0x0d757138, 0x114e0000) from space 26176K, 100% used [0x114e0000, 0x12e70000, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 65080K [0x14800000, 0x44800000, 0x44800000) Metaspace used 16737K, capacity 16926K, committed 17024K, reserved 17792K Card table byte_map: [0x44800000,0x44a10000] byte_map_base: 0x447dc000 Marking Bits: (CMSBitMap*) 0x024558e8 Bits: [0x44ba0000, 0x463a0000) Mod Union Table: (CMSBitMap*) 0x02455948 Bits: [0x04710000, 0x04740000) Polling page: 0x00ae0000 CodeCache: size=32768Kb used=3929Kb max_used=3929Kb free=28838Kb bounds [0x024e0000, 0x028b8000, 0x044e0000] total_blobs=2108 nmethods=1804 adapters=242 compilation: enabled Compilation events (10 events): Event: 15.124 Thread 0x46501800 1808 java.lang.StringBuilder::append (6 bytes) Event: 15.124 Thread 0x46501800 nmethod 1808 0x028acf88 code [0x028ad080, 0x028ad11c] Event: 15.124 Thread 0x46501800 1809 java.lang.StringBuilder::append (6 bytes) Event: 15.124 Thread 0x46501800 nmethod 1809 0x028ad188 code [0x028ad280, 0x028ad31c] Event: 15.196 Thread 0x46501800 1810 java.util.Formatter::access$000 (5 bytes) Event: 15.196 Thread 0x46501800 nmethod 1810 0x028ad388 code [0x028ad480, 0x028ad4f0] Event: 15.206 Thread 0x46501800 1811 java.util.Formatter::parse (151 bytes) Event: 15.208 Thread 0x46501800 nmethod 1811 0x028ad548 code [0x028ad7c0, 0x028ae1c8] Event: 15.299 Thread 0x46501800 1812 ! org.lwjgl.opengl.Display::isCreated (17 bytes) Event: 15.299 Thread 0x46501800 nmethod 1812 0x028aef88 code [0x028af080, 0x028af200] GC Heap History (10 events): Event: 1.355 GC heap before {Heap before GC invocations=0 (full 0): par new generation total 235968K, used 50384K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 24% used [0x04800000, 0x07934160, 0x114e0000) from space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 0K [0x14800000, 0x44800000, 0x44800000) Metaspace used 6026K, capacity 6043K, committed 6144K, reserved 6528K Event: 1.392 GC heap after Heap after GC invocations=1 (full 1): par new generation total 235968K, used 0K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 0% used [0x04800000, 0x04800000, 0x114e0000) from space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 5028K [0x14800000, 0x44800000, 0x44800000) Metaspace used 6026K, capacity 6043K, committed 6144K, reserved 6528K } Event: 6.133 GC heap before {Heap before GC invocations=1 (full 2): par new generation total 235968K, used 209792K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 100% used [0x04800000, 0x114e0000, 0x114e0000) from space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 5028K [0x14800000, 0x44800000, 0x44800000) Metaspace used 9652K, capacity 9707K, committed 9856K, reserved 10624K Event: 6.155 GC heap after Heap after GC invocations=2 (full 2): par new generation total 235968K, used 20881K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 0% used [0x04800000, 0x04800000, 0x114e0000) from space 26176K, 79% used [0x12e70000, 0x142d4658, 0x14800000) to space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) concurrent mark-sweep generation total 786432K, used 5028K [0x14800000, 0x44800000, 0x44800000) Metaspace used 9652K, capacity 9707K, committed 9856K, reserved 10624K } Event: 9.533 GC heap before {Heap before GC invocations=2 (full 2): par new generation total 235968K, used 230673K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 100% used [0x04800000, 0x114e0000, 0x114e0000) from space 26176K, 79% used [0x12e70000, 0x142d4658, 0x14800000) to space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) concurrent mark-sweep generation total 786432K, used 5028K [0x14800000, 0x44800000, 0x44800000) Metaspace used 13890K, capacity 14060K, committed 14080K, reserved 14720K Event: 9.616 GC heap after Heap after GC invocations=3 (full 2): par new generation total 235968K, used 14070K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 0% used [0x04800000, 0x04800000, 0x114e0000) from space 26176K, 53% used [0x114e0000, 0x1229dac8, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 22707K [0x14800000, 0x44800000, 0x44800000) Metaspace used 13890K, capacity 14060K, committed 14080K, reserved 14720K } Event: 11.617 GC heap before {Heap before GC invocations=3 (full 2): par new generation total 235968K, used 223862K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 100% used [0x04800000, 0x114e0000, 0x114e0000) from space 26176K, 53% used [0x114e0000, 0x1229dac8, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 19926K [0x14800000, 0x44800000, 0x44800000) Metaspace used 14917K, capacity 15084K, committed 15104K, reserved 15744K Event: 11.649 GC heap after Heap after GC invocations=4 (full 2): par new generation total 235968K, used 26176K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 0% used [0x04800000, 0x04800000, 0x114e0000) from space 26176K, 100% used [0x12e70000, 0x14800000, 0x14800000) to space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) concurrent mark-sweep generation total 786432K, used 29294K [0x14800000, 0x44800000, 0x44800000) Metaspace used 14917K, capacity 15084K, committed 15104K, reserved 15744K } Event: 13.354 GC heap before {Heap before GC invocations=4 (full 2): par new generation total 235968K, used 235968K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 100% used [0x04800000, 0x114e0000, 0x114e0000) from space 26176K, 100% used [0x12e70000, 0x14800000, 0x14800000) to space 26176K, 0% used [0x114e0000, 0x114e0000, 0x12e70000) concurrent mark-sweep generation total 786432K, used 29294K [0x14800000, 0x44800000, 0x44800000) Metaspace used 14923K, capacity 15084K, committed 15104K, reserved 15744K Event: 13.455 GC heap after Heap after GC invocations=5 (full 2): par new generation total 235968K, used 26176K [0x04800000, 0x14800000, 0x14800000) eden space 209792K, 0% used [0x04800000, 0x04800000, 0x114e0000) from space 26176K, 100% used [0x114e0000, 0x12e70000, 0x12e70000) to space 26176K, 0% used [0x12e70000, 0x12e70000, 0x14800000) concurrent mark-sweep generation total 786432K, used 65080K [0x14800000, 0x44800000, 0x44800000) Metaspace used 14923K, capacity 15084K, committed 15104K, reserved 15744K } Deoptimization events (0 events): No events Internal exceptions (10 events): Event: 15.257 Thread 0x55584c00 Exception <a 'org="" lwjgl="" lwjglexception'="">(0x0d29e190) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.257 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d29e658) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.257 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d29ebd0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.257 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d29f1b8) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.257 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d29f708) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.257 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d29fc30) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.258 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d2a01a8) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.258 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d2a0708) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.258 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d2a0c30) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.259 Thread 0x55584c00 Exception</a> <a 'org="" lwjgl="" lwjglexception'="">(0x0d2a1100) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u45\3627\hotspot\src\share\vm\prims\jni.cpp, line 709] Events (10 events): Event: 15.382 Thread 0x55584c00 DEOPT PACKING pc=0x02607594 sp=0x53afea30 Event: 15.382 Thread 0x55584c00 DEOPT UNPACKING pc=0x0251c5db sp=0x53afe950 mode 1 Event: 15.383 loading class org/lwjgl/openal/OpenALException Event: 15.383 loading class org/lwjgl/openal/OpenALException done Event: 15.383 Thread 0x55584c00 DEOPT PACKING pc=0x0268287c sp=0x53afe0a0 Event: 15.383 Thread 0x55584c00 DEOPT UNPACKING pc=0x0251c5db sp=0x53afdf50 mode 1 Event: 15.383 Thread 0x55584c00 DEOPT PACKING pc=0x02607628 sp=0x53afe0f0 Event: 15.383 Thread 0x55584c00 DEOPT UNPACKING pc=0x0251c5db sp=0x53afe010 mode 1 Event: 15.383 Thread 0x55584c00 DEOPT PACKING pc=0x02607594 sp=0x53afe1d0 Event: 15.383 Thread 0x55584c00 DEOPT UNPACKING pc=0x0251c5db sp=0x53afe0f0 mode 1 Dynamic libraries: 0x00fa0000 - 0x00fd3000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\javaw.exe 0x77220000 - 0x7738e000 C:\WINDOWS\SYSTEM32\ntdll.dll 0x76e00000 - 0x76f40000 C:\WINDOWS\SYSTEM32\KERNEL32.DLL 0x755d0000 - 0x756a7000 C:\WINDOWS\SYSTEM32\KERNELBASE.dll 0x6b240000 - 0x6b2e0000 C:\WINDOWS\system32\apphelp.dll 0x64160000 - 0x643c6000 C:\WINDOWS\AppPatch\AcGenral.DLL 0x76a70000 - 0x76b33000 C:\WINDOWS\SYSTEM32\msvcrt.dll 0x76cc0000 - 0x76d01000 C:\WINDOWS\SYSTEM32\sechost.dll 0x74a20000 - 0x74a3e000 C:\WINDOWS\SYSTEM32\SspiCli.dll 0x76d10000 - 0x76d55000 C:\WINDOWS\SYSTEM32\SHLWAPI.dll 0x69240000 - 0x6932d000 C:\WINDOWS\SYSTEM32\UxTheme.dll 0x74a40000 - 0x74b93000 C:\WINDOWS\SYSTEM32\USER32.dll 0x76f40000 - 0x7704f000 C:\WINDOWS\SYSTEM32\GDI32.dll 0x724a0000 - 0x724c3000 C:\WINDOWS\SYSTEM32\WINMM.dll 0x699b0000 - 0x699c3000 C:\WINDOWS\SYSTEM32\samcli.dll 0x750e0000 - 0x75209000 C:\WINDOWS\SYSTEM32\ole32.dll 0x76d60000 - 0x76df5000 C:\WINDOWS\SYSTEM32\OLEAUT32.dll 0x68dc0000 - 0x68dd7000 C:\WINDOWS\SYSTEM32\MSACM32.dll 0x74570000 - 0x74578000 C:\WINDOWS\SYSTEM32\VERSION.dll 0x757c0000 - 0x76a6d000 C:\WINDOWS\SYSTEM32\SHELL32.dll 0x73f40000 - 0x73f5b000 C:\WINDOWS\SYSTEM32\USERENV.dll 0x6ca60000 - 0x6ca7a000 C:\WINDOWS\SYSTEM32\dwmapi.dll 0x6b0c0000 - 0x6b20a000 C:\WINDOWS\SYSTEM32\urlmon.dll 0x770d0000 - 0x7714c000 C:\WINDOWS\SYSTEM32\ADVAPI32.dll 0x6cd00000 - 0x6cd65000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV 0x6cd80000 - 0x6cd96000 C:\WINDOWS\SYSTEM32\MPR.dll 0x76b40000 - 0x76bfa000 C:\WINDOWS\SYSTEM32\RPCRT4.dll 0x74a10000 - 0x74a1a000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll 0x75450000 - 0x755cd000 C:\WINDOWS\SYSTEM32\combase.dll 0x720f0000 - 0x72113000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll 0x73ef0000 - 0x73eff000 C:\WINDOWS\SYSTEM32\profapi.dll 0x73f60000 - 0x74192000 C:\WINDOWS\SYSTEM32\iertutil.dll 0x74380000 - 0x74564000 C:\WINDOWS\SYSTEM32\WININET.dll 0x749b0000 - 0x74a04000 C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll 0x74d70000 - 0x74dac000 C:\WINDOWS\SYSTEM32\cfgmgr32.dll 0x720c0000 - 0x720e1000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll 0x73e60000 - 0x73eeb000 C:\WINDOWS\SYSTEM32\SHCORE.DLL 0x76c00000 - 0x76c27000 C:\WINDOWS\system32\IMM32.DLL 0x74db0000 - 0x74ec2000 C:\WINDOWS\SYSTEM32\MSCTF.dll 0x696b0000 - 0x698b6000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17810_none_a9edf09f013934e0\COMCTL32.dll 0x640a0000 - 0x6415f000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\msvcr100.dll 0x543d0000 - 0x54790000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\client\jvm.dll 0x74650000 - 0x74658000 C:\WINDOWS\SYSTEM32\WSOCK32.dll 0x750d0000 - 0x750d6000 C:\WINDOWS\SYSTEM32\PSAPI.DLL 0x76c30000 - 0x76c80000 C:\WINDOWS\SYSTEM32\WS2_32.dll 0x770c0000 - 0x770c7000 C:\WINDOWS\SYSTEM32\NSI.dll 0x6a8f0000 - 0x6a8fc000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\verify.dll 0x69380000 - 0x693a1000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.dll 0x68380000 - 0x683a9000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\jdwp.dll 0x6aa10000 - 0x6aa17000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\npt.dll 0x69360000 - 0x69373000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\zip.dll 0x6a570000 - 0x6a578000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\dt_socket.dll 0x6da50000 - 0x6da61000 C:\WINDOWS\system32\napinsp.dll 0x6da30000 - 0x6da46000 C:\WINDOWS\system32\pnrpnsp.dll 0x6da10000 - 0x6da24000 C:\WINDOWS\system32\NLAapi.dll 0x71f70000 - 0x71fbb000 C:\WINDOWS\System32\mswsock.dll 0x74260000 - 0x742de000 C:\WINDOWS\SYSTEM32\DNSAPI.dll 0x6da00000 - 0x6da0a000 C:\WINDOWS\System32\winrnr.dll 0x6d9d0000 - 0x6d9f1000 C:\Program Files (x86)\Bonjour\mdnsNSP.dll 0x74240000 - 0x74260000 C:\WINDOWS\SYSTEM32\Iphlpapi.DLL 0x73f30000 - 0x73f38000 C:\WINDOWS\SYSTEM32\WINNSI.DLL 0x6ce30000 - 0x6ce76000 C:\WINDOWS\System32\fwpuclnt.dll 0x6ce80000 - 0x6ce88000 C:\Windows\System32\rasadhlp.dll 0x68de0000 - 0x68dea000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\management.dll 0x67ca0000 - 0x67cb5000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\net.dll 0x69350000 - 0x6935f000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\nio.dll 0x484e0000 - 0x4852d000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\lwjgl.dll 0x68eb0000 - 0x68f8e000 C:\WINDOWS\SYSTEM32\OPENGL32.dll 0x507c0000 - 0x507e5000 C:\WINDOWS\SYSTEM32\GLU32.dll 0x698c0000 - 0x699ac000 C:\WINDOWS\SYSTEM32\DDRAW.dll 0x6b220000 - 0x6b227000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll 0x73b60000 - 0x73b79000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll 0x73b30000 - 0x73b60000 C:\WINDOWS\system32\rsaenh.dll 0x73b10000 - 0x73b2e000 C:\WINDOWS\SYSTEM32\bcrypt.dll 0x71fe0000 - 0x71ff3000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL 0x71fc0000 - 0x71fd4000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL 0x63f50000 - 0x64095000 C:\Program Files (x86)\Java\jre1.8.0_45\bin\awt.dll 0x48cf0000 - 0x4a733000 C:\Program Files (x86)\Razer\Razer Game Booster\K_FPS.dll 0x6d450000 - 0x6d591000 C:\WINDOWS\SYSTEM32\dbghelp.dll 0x4a740000 - 0x4a93f000 C:\Program Files (x86)\Razer\Razer Game Booster\d3dx9_43.dll 0x4a940000 - 0x4a9b4000 C:\Program Files (x86)\Razer\Razer Game Booster\d3dx10_43.dll 0x4a9c0000 - 0x4a9ff000 C:\Program Files (x86)\Razer\Razer Game Booster\d3dx11_43.dll 0x4aa00000 - 0x4aa47000 C:\Program Files (x86)\Razer\Razer Game Booster\D3DX8Wrapper.dll 0x4aa50000 - 0x4ac57000 C:\Program Files (x86)\Razer\Razer Game Booster\D3DCOMPILER_43.dll 0x4ac60000 - 0x4add0000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.17415_none_dad8722c5bcc2d8f\gdiplus.dll 0x75220000 - 0x752bb000 C:\WINDOWS\SYSTEM32\COMDLG32.dll 0x46ed0000 - 0x46eeb000 C:\Program Files (x86)\Razer\Razer Game Booster\EasyHook32.dll 0x68520000 - 0x685a1000 C:\WINDOWS\SYSTEM32\DSOUND.dll 0x731d0000 - 0x73210000 C:\WINDOWS\SYSTEM32\POWRPROF.dll 0x4ade0000 - 0x4adf2000 C:\Program Files (x86)\RocketDock\RocketDock.dll 0x4ae10000 - 0x4ae31000 C:\PROGRA~2\Raptr\ltc_help32-99265.dll 0x76c80000 - 0x76cbd000 C:\WINDOWS\SYSTEM32\WINTRUST.dll 0x752c0000 - 0x75448000 C:\WINDOWS\SYSTEM32\CRYPT32.dll 0x74d60000 - 0x74d6e000 C:\WINDOWS\SYSTEM32\MSASN1.dll 0x686a0000 - 0x686b5000 C:\WINDOWS\SYSTEM32\atiglpxx.dll 0x4b290000 - 0x4c765000 C:\WINDOWS\SYSTEM32\atioglxx.dll 0x74ba0000 - 0x74d51000 C:\WINDOWS\SYSTEM32\SETUPAPI.dll 0x4aec0000 - 0x4af60000 C:\WINDOWS\SYSTEM32\atiadlxy.dll 0x6d2f0000 - 0x6d42a000 C:\WINDOWS\SYSTEM32\PROPSYS.dll 0x6d9c0000 - 0x6d9cf000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll 0x4b0a0000 - 0x4b19c000 C:\WINDOWS\SYSTEM32\aticfx32.dll 0x4ae60000 - 0x4ae7c000 C:\WINDOWS\SYSTEM32\atigktxx.dll 0x73410000 - 0x73419000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll 0x5bde0000 - 0x5be5f000 C:\WINDOWS\SYSTEM32\mscms.dll 0x5e8a0000 - 0x5e8db000 C:\WINDOWS\SYSTEM32\icm32.dll 0x70a40000 - 0x70a7a000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\avutil-ttv-51.dll 0x65980000 - 0x6599d000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\swresample-ttv-0.dll 0x6eb80000 - 0x6ec09000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\libmp3lame-ttv.dll 0x57850000 - 0x587d0000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\libmfxsw32.dll 0x61870000 - 0x61973000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\twitchsdk.dll 0x53b90000 - 0x53bf5000 C:\Users\alexy\.gradle\caches\minecraft\net\minecraft\minecraft_natives\1.7.10\OpenAL32.dll 0x75730000 - 0x757bd000 C:\WINDOWS\SYSTEM32\clbcatq.dll 0x68e00000 - 0x68e53000 C:\WINDOWS\System32\MMDevApi.dll 0x683b0000 - 0x68410000 C:\WINDOWS\SYSTEM32\AUDIOSES.DLL VM Arguments: jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:65104 -Xincgc -Xmx1024M -Xms1024M -Dfile.encoding=Cp1252 java_command: GradleStart java_class_path (initial): C:\Users\alexy\Desktop\Forge\bin;C:\Users\alexy\.gradle\caches\minecraft\net\minecraftforge\forge\1.7.10-10.13.4.1481-1.7.10\forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\net.minecraft\launchwrapper\1.12\111e7bea9c968cdb3d06ef4632bf7ff0824d0f36\launchwrapper-1.12.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\1.3.9\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\jsr305-1.3.9.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-debug-all\5.0.3\f9e364ae2a66ce2a543012a4668856e84e5dab74\asm-debug-all-5.0.3.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\com.typesafe.akka\akka-actor_2.11\2.3.3\ed62e9fc709ca0f2ff1a3220daa8b70a2870078e\akka-actor_2.11-2.3.3.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\com.typesafe\config\1.2.1\f771f71fdae3df231bcd54d5ca2d57f0bf93f467\config-1.2.1.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-actors-migration_2.11\1.1.0\dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f\scala-actors-migration_2.11-1.1.0.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-compiler\2.11.1\56ea2e6c025e0821f28d73ca271218b8dd04926a\scala-compiler-2.11.1.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-library_2.11\1.0.2\e517c53a7e9acd6b1668c5a35eccbaa3bab9aac\scala-continuations-library_2.11-1.0.2.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-plugin_2.11.1\1.0.2\f361a3283452c57fa30c1ee69448995de23c60f7\scala-continuations-plugin_2.11.1-1.0.2.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-library\2.11.1\e11da23da3eabab9f4777b9220e60d44c1aab6a\scala-library-2.11.1.jar;C:\Users\alexy\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-parser-combinators_2.11\1.0.1\f05d7345bf5a58924f2837c6c1f4d73a938e1ff0\scala-parser-combinators_2.11-1.0.1.jar;C:\Users\alexy\.g Launcher Type: SUN_STANDARD Environment Variables: PATH=C:/Program Files (x86)/Java/jre1.8.0_45/bin/client;C:/Program Files (x86)/Java/jre1.8.0_45/bin;C:/Program Files (x86)/Java/jre1.8.0_45/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;c:\Program Files (x86)\AMD APP\bin\x86_64;c:\Program Files (x86)\AMD APP\bin\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files (x86)\Jar2Exe Wizard\;C:\Users\alexy\Desktop\eclipse; USERNAME=alexy OS=Windows_NT PROCESSOR_IDENTIFIER=AMD64 Family 21 Model 16 Stepping 1, AuthenticAMD –------------- S Y S T E M --------------- OS: Windows 8.1 , 64 bit Build 9600 (6.3.9600.17415) CPU:total 4 (4 cores per cpu, 1 threads per core) family 21 model 16 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, mmxext, 3dnowpref, lzcnt, sse4a, tsc, tscinvbit, tscinv, bmi1 Memory: 4k page, physical 11736560k(5626620k free), swap 14194160k(4019980k free) vm_info: Java HotSpot(TM) Client VM (25.45-b02) for windows-x86 JRE (1.8.0_45-b15), built on Apr 30 2015 12:31:00 by "java_re" with MS VC++ 10.0 (VS2010) time: Tue Jul 28 12:56:27 2015 elapsed time: 15 seconds (0d 0h 0m 15s)
Mon code:
package diabolicatrix.base; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; public class PacketIsOp implements IMessage { private boolean isOp; public PacketIsOp() { } public PacketIsOp(boolean isOp){ this.isOp = isOp; } @Override public void fromBytes(ByteBuf buf) { this.isOp = buf.readBoolean(); } @Override public void toBytes(ByteBuf buf) { buf.writeBoolean(this.isOp); } public static class PacketHandler implements IMessageHandler <packetisop, imessage="">{ public EntityPlayerMP emp; public T4EventHandler eh; @Override public IMessage onMessage(PacketIsOp message, MessageContext ctx) { EntityPlayerMP player = ctx.getServerHandler().playerEntity; this.emp = player; if(MinecraftServer.getServer().getConfigurationManager().func_152596_g(((EntityPlayerMP)player).getGameProfile())) { eh.setOp(true); } else { eh.setOp(false); } return null; } } } ```</packetisop,></a>
-
public T4EventHandler eh;
ça c’est bon pour causer un npe.
Ce n’est pas comme ça que tu dois faire, tu dois renvoyer un paquet réponse.
Et le crash que tu nous as envoyé n’a aucun rapport avec ton code, c’est le lib openAL (pour le son) qui crash. -
La dernière fois que j’ai eu cette erreur “Failed to write core dump” c’est parce que je n’allouer pas assez de mémoire a Java au démarrage. Mais comme l’a dit Robin, ça n’a rien a voir avec ton mod.
Tes attributs dans ton packet handler ne servent à rien.
Tu manques d’optimisation.
Je pense que tu n’as pas compris la séparation Client/Server de Minecraft ni le fonctionnement des paquets.Suit mon tuto étape par étape, je vais te guider si tu veux.
Commence par envoyer un simple paquet du client vers le serveur qui lui dit : “Je veux savoir si je suis op”.
Ce paquet n’a pas besoin de contenir des informations.
Met juste un System.out.println(“Paquet reçu”) lorsque le serveur reçoit ce paquet.Post ton code, je t’explique la suite après. On va faire étape par étape.
-
Pour le crash j’avais bien vu que ca n’était pas un crash normal mais bon.
Donc j’ai fait comme tu as dit: j’ai suivi le tutoriel et ça fonctionne(je println quand je reçois le packet)
Mon code:
package diabolicatrix.base; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; public class PacketOp implements IMessage { @Override public void fromBytes(ByteBuf buf) {} @Override public void toBytes(ByteBuf buf) {} public static class Handler implements IMessageHandler <packetop, imessage="">{ @Override public IMessage onMessage(PacketOp message, MessageContext ctx) { System.out.println("Message Reçu"); return null; } } }
Le event handle:
package diabolicatrix.base; import java.util.Iterator; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import diabolicatrix.base.proxy.ClientProxy; import diabolicatrix.base.Base; import ibxm.Player; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.entity.EntityOtherPlayerMP; import net.minecraft.client.gui.FontRenderer; import net.minecraft.command.ICommandSender; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.client.gui.GuiLabel; import net.minecraft.client.gui.GuiScreen; import net.minecraft.server.MinecraftServer; import net.minecraft.server.management.ServerConfigurationManager; import net.minecraft.server.management.UserListOpsEntry; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; public class T4EventHandler { private MinecraftServer mcs; private Minecraft mc; @SubscribeEvent @SideOnly(Side.CLIENT) public void onKeyInput(KeyInputEvent event) { if (ClientProxy.overMouse.isPressed()) { if (Minecraft.getMinecraft().objectMouseOver.entityHit instanceof EntityLiving) { Base.instance.network.sendToServer(new PacketOp()); //Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver()); } } } }
Mon main:
network = NetworkRegistry.INSTANCE.newSimpleChannel("T4Channel"); network.registerMessage(PacketOp.Handler.class, PacketOp.class, 0, Side.SERVER);
PS: je crois que j’ai signalé ton message, je cherchais le + :P</packetop,>
-
Il te reste juste à renvoyer au client un autre paquet contenant un booléen pour savoir si oui ou non le joueur est op. Mais je te conseille plutôt d’envoyer des informations qui exécuteront la tâche voulut si le joueur est op. Car c’est très simple ensuite de cheater avec ton mod si t’utilises les paquet pour savoir si le joueur est op.
-
Donc, mon nouveau code:
package diabolicatrix.base; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; public class PacketOp implements IMessage { @Override public void fromBytes(ByteBuf buf) {} @Override public void toBytes(ByteBuf buf) {} public static class Handler implements IMessageHandler <packetop, imessage="">{ private boolean isOp; @Override public IMessage onMessage(PacketOp message, MessageContext ctx) { EntityPlayerMP player = ctx.getServerHandler().playerEntity; System.out.println("Message Reçu"); if(MinecraftServer.getServer().getConfigurationManager().func_152596_g(player.getGameProfile())) { System.out.println("op"); Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver("OP!!")); } else { System.out.println("player"); Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver("Player!!")); } return null; } } }
Mon client est parfait si le allow cheats est à off, ça affiche player sinon ça affiche op.
Mon server crash et je ne comprend pas…
[22:16:21] [Server thread/ERROR] [FML]: The following problems were captured during this phase [22:16:21] [Server thread/ERROR] [FML]: Caught exception from t4 java.lang.NoClassDefFoundError: Lnet/minecraft/client/Minecraft; at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_51] at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:43) ~[ProxyInjector.class:?] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) [Loader.class:?] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87) [FMLServerHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314) [FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) [DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.Minecraft at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] … 32 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) ~[forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] … 32 more [22:16:21] [Server thread/ERROR]: Encountered an unexpected exception cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: Lnet/minecraft/client/Minecraft; at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:544) ~[Loader.class:?] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87) ~[FMLServerHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.NoClassDefFoundError: Lnet/minecraft/client/Minecraft; at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_51] at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:43) ~[ProxyInjector.class:?] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) ~[Loader.class:?] … 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.Minecraft at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_51] at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:43) ~[ProxyInjector.class:?] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) ~[Loader.class:?] … 5 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) ~[forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_51] at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:43) ~[ProxyInjector.class:?] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) ~[Loader.class:?] … 5 more [22:16:21] [Server thread/ERROR]: This crash report has been saved to: C:\Users\alexy\Desktop\Forge\eclipse\.\crash-reports\crash-2015-07-28_22.16.21-server.txt [22:16:21] [Server thread/WARN] [FML]: Can't revert to frozen GameData state without freezing first. [22:16:21] [Server thread/INFO] [FML]: Applying holder lookups [22:16:21] [Server thread/INFO] [FML]: Holder lookups applied [22:16:21] [Server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED. Errors may have been discarded. [22:16:21] [Server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state AVAILABLE. Errors may have been discarded. Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release ```</packetop,>
-
La classe Minecraft n’existe pas côté client.
Tu dois faire comme ça :@Override public IMessage onMessage(PacketOp message, MessageContext ctx) { EntityPlayerMP player = ctx.getServerHandler().playerEntity; System.out.println("Message Reçu"); if(MinecraftServer.getServer().getConfigurationManager().func_152596_g(player.getGameProfile())) { System.out.println("op"); return new PacketOpenAdminGui("OP!!"); } else { System.out.println("player"); return new PacketOpenAdminGui("Player!!"); } return null; }
Ensuite tu créé une classe PacketOpenAdminGui dans laquelle tu fais passer la variable string et dans le handle (qui sera donc côté client cette fois) tu fais l’action du openGui.
-
Ton premier code est correct.
Juste le nom de paquet qui est a changer pour éviter les confusion.
Le premier paquet que tu envoie sert a dire au serveur que tu souhaite ouvrir un GUI mais qu’il te faut plus d’information. Donc un bon nom de paquet serait par exemple “PacketAskForGui” ou un truc du genre.Coté serveur, le handler reçoit le paquet.
La mission du handler ici, c’est de répondre au client.
Donc le handler doit vérifier que le joueur est OP, et lui retourner un paquet avec cette information.
Ta classe Handler implémente IMessageHandler avec 2 types générique <laclassdupacketreçu, laclassdupacketrenvoié=“”>Donc dans ton Handler il faut que tu remplace IMessage par la class d’un nouveau paquet.
On appellera cette classe PacketOpenGui mais le nom n’a pas d’importance tant que ça reste logique.
C’est la ou tu dois avec un attribut boolean isOp, c’est dans ton PacketOpenGui.Donc dans le Handler, tu crées une nouvelle instance de ton PacketOpenGui et au lieu de faire un return null, tu retournes ton objet PacketOpenGui.
Assure toi d’avoir bien enregistré le packet avec network.registerMessage();
Incrémente le discriminant (l’id du packet) de 1 et change la side, puisque cette fois ci c’est le client qui reçoit le packet.
Donc Side.Client.Dans ton PacketOpenGui.Handler tu vérifies le contenue de ton PacketOpenGui, et tu ouvre le GUI que tu veux en conséquence.</laclassdupacketreçu,>
-
[11:51:27] [Server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:27] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:27] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel T4Channel io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:27] [Server thread/INFO]: Player497 lost connection: TextComponent{text='A fatal error has occured, this connection is terminated', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}} [11:51:27] [Server thread/INFO]: Player497 left the game [11:51:27] [Server thread/INFO]: Stopping singleplayer server as player logged out [11:51:27] [Server thread/INFO]: Stopping server [11:51:27] [Server thread/INFO]: Saving players [11:51:27] [Server thread/INFO]: Saving worlds [11:51:27] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [11:51:27] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [11:51:27] [Server thread/INFO]: Saving chunks for level 'New World'/The End [11:51:27] [Server thread/INFO] [FML]: Unloading dimension 0 [11:51:27] [Server thread/INFO] [FML]: Unloading dimension -1 [11:51:27] [Server thread/INFO] [FML]: Unloading dimension 1 [11:51:27] [Server thread/INFO] [FML]: Applying holder lookups [11:51:27] [Server thread/INFO] [FML]: Holder lookups applied [11:51:34] [Client thread/INFO]: Connecting to localhost, 25565 [11:51:37] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [11:51:37] [Server thread/INFO]: Generating keypair [11:51:37] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [11:51:37] [Server thread/INFO] [FML]: Applying holder lookups [11:51:37] [Server thread/INFO] [FML]: Holder lookups applied [11:51:37] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@4d22e9) [11:51:37] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@4d22e9) [11:51:37] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@4d22e9) [11:51:37] [Server thread/INFO]: Preparing start region for level 0 [11:51:38] [Server thread/INFO]: Changing view distance to 8, from 10 [11:51:38] [Netty Client IO #3/INFO] [FML]: Server protocol version 2 [11:51:38] [Netty IO #3/INFO] [FML]: Client protocol version 2 [11:51:38] [Netty IO #3/INFO] [FML]: Client attempting to join with 4 mods : t4@1.0.1,FML@7.10.99.99,Forge@10.13.4.1481,mcp@9.05 [11:51:38] [Netty IO #3/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [11:51:38] [Netty Client IO #3/INFO] [FML]: Attempting connection with missing mods [] at SERVER [11:51:38] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [11:51:38] [Server thread/INFO]: Player497[local:E:8e75903f] logged in with entity id 940 at (-75.98172863943033, 63.0, 307.58688578944117) [11:51:38] [Server thread/INFO]: Player497 joined the game [11:51:38] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [11:51:42] [Server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:42] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:42] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel T4Channel io.netty.handler.codec.DecoderException: java.lang.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.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.InstantiationException: diabolicatrix.base.PacketOpenPlayerMenu at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more Caused by: java.lang.NoSuchMethodException: diabolicatrix.base.PacketOpenPlayerMenu.<init>() at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_51] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_51] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:75) ~[FMLIndexedMessageToMessageCodec.class:?] at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?] … 13 more [11:51:42] [Server thread/INFO]: Stopping server [11:51:42] [Server thread/INFO]: Saving players [11:51:42] [Server thread/INFO]: Saving worlds [11:51:42] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [11:51:42] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [11:51:42] [Server thread/INFO]: Saving chunks for level 'New World'/The End [11:51:43] [Server thread/INFO] [FML]: Unloading dimension 0 [11:51:43] [Server thread/INFO] [FML]: Unloading dimension -1 [11:51:43] [Server thread/INFO] [FML]: Unloading dimension 1 [11:51:43] [Server thread/INFO] [FML]: Applying holder lookups [11:51:43] [Server thread/INFO] [FML]: Holder lookups applied
Mon PacketOp:
package diabolicatrix.base; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; public class PacketOp implements IMessage { @Override public void fromBytes(ByteBuf buf) {} @Override public void toBytes(ByteBuf buf) {} public static class Handler implements IMessageHandler <packetop, packetopenplayermenu="">{ private boolean isOp; @Override public PacketOpenPlayerMenu onMessage(PacketOp message, MessageContext ctx) { EntityPlayerMP player = ctx.getServerHandler().playerEntity; System.out.println("Message Reçu"); if(MinecraftServer.getServer().getConfigurationManager().func_152596_g(player.getGameProfile())) { System.out.println("op"); return new PacketOpenPlayerMenu(true); } else { System.out.println("player"); return new PacketOpenPlayerMenu(false); } } } }
Mon packopenplayer…:
package diabolicatrix.base; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; public class PacketOpenPlayerMenu implements IMessage { public static boolean isOp; public PacketOpenPlayerMenu(boolean b) { this.isOp = b; } @Override public void fromBytes(ByteBuf buf) {} @Override public void toBytes(ByteBuf buf) {} public static class Handler implements IMessageHandler <packetopenplayermenu, imessage="">{ @Override public IMessage onMessage(PacketOpenPlayerMenu message, MessageContext ctx) { if(isOp) { Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOverOp()); } else { Minecraft.getMinecraft().displayGuiScreen(new GuiMouseOver()); } return null; } } } ```</packetopenplayermenu,></packetop,></init></init></init></init></init></init>