Jump to content

Capabilities


LaurentOutang

Recommended Posts

Hello,
I tried to follow this tuto about capabilities : https://www.planetminecraft.com/blog/forge-tutorial-capability-system/
I used the new functions ( not deprecated ones ) but when i run the project, the game crashes because of what is in the "onPlayerLogsIn" : IMana mana = player.getCapability(ManaProvider.MANA_CAP, null);
Can you help me fixing it pls ? Thank you. (Sorry for my english)

Link to comment
Share on other sites

in the main : 

@EventHandler
	public static void PreInit(FMLPreInitializationEvent event)
	{
		MentalStorage.register();
	}

in IMental.java : 

package com.laurentoutang.hardmod.capabilities;

public interface IMental {

	public void consume(float points);
	public void fill(float points);
	public void setMental(float points);
	public float getMental();
}

in Mental.java

package com.laurentoutang.hardmod.capabilities;

import io.netty.buffer.ByteBuf;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.INBTSerializable;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class Mental implements IMental{

	private float mental=100.f;
	
	
	public Mental(float mental)
	{
		this.mental = mental;
	}
	public Mental()
	{
		
	}
	
	@Override
	public void consume(float points) {
		if(mental-points < 0)
			mental = 0;
		else
			mental -= points;
	}

	@Override
	public void fill(float points) {
		if(mental + points > 100)
			mental = 100;
		else
			mental += points;
	}

	@Override
	public void setMental(float points) {
		mental = points;
	}

	@Override
	public float getMental() {
		return mental;
	}	

}

in MentalProvider.java 

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTBase;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;

public class MentalProvider implements ICapabilitySerializable<NBTBase>{

	 @CapabilityInject(IMental.class)

	 public static final Capability<IMental> Mental_CAP = null;

	 
	 private IMental instance = Mental_CAP.getDefaultInstance();

	 
	 @Override

	 public boolean hasCapability(Capability<?> capability, EnumFacing facing)

	 {

		 return capability == Mental_CAP;

	 }

	 
	 @Override

	 public <T> T getCapability(Capability<T> capability, EnumFacing facing)

	 {

		 return capability == Mental_CAP ? Mental_CAP.<T> cast(this.instance) : null;

	 }

	 
	 @Override

	 public NBTBase serializeNBT()

	 {

		 return Mental_CAP.getStorage().writeNBT(Mental_CAP, this.instance, null);

	 }

	 
	 @Override

	 public void deserializeNBT(NBTBase nbt)

	 {

		 Mental_CAP.getStorage().readNBT(Mental_CAP, this.instance, null, nbt);

	 }
}

in MentalStorage.java

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.Capability.IStorage;
import net.minecraftforge.common.capabilities.CapabilityManager;

public class MentalStorage implements IStorage<IMental>{

	 @Override

	 public NBTBase writeNBT(Capability<IMental> capability, IMental instance, EnumFacing side)

	 {

	 return new NBTTagFloat(instance.getMental());

	 }

	 
	 @Override

	 public void readNBT(Capability<IMental> capability, IMental instance, EnumFacing side, NBTBase nbt)

	 {

	 instance.setMental(((NBTPrimitive) nbt).getFloat());

	 }
	 
	 public static void register()
	 {
		 CapabilityManager.INSTANCE.register(IMental.class, new MentalStorage(), Mental::new);//Mental::new else deprecated
	 }
}

in CapabilityHandler 

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class CapabilityHandler {
	
	 public static final ResourceLocation Mental_CAP = new ResourceLocation(Reference.MOD_ID, "mental");

	 
	 @SubscribeEvent

	 public void attachCapability(AttachCapabilitiesEvent<Entity> event)
	 {
		 if (event.getObject() instanceof EntityPlayer)
			 event.addCapability(Mental_CAP, new MentalProvider());	 //!= than tuto

	 }
}

in EventHandler

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.IMental;
import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber(value = Side.CLIENT, modid = Reference.MOD_ID)
public class EventHandler {

	 @SubscribeEvent
	 public static void onPlayerLogsIn(PlayerLoggedInEvent event)//static else it doesnt work

	 {

		 EntityPlayer player = event.player;

		 IMental mental = player.getCapability(MentalProvider.Mental_CAP, null);

	 
		 String message = String.format("mental = ", (int) mental.getMental());

		 player.sendMessage(new TextComponentString(message));
		 player.sendMessage(new TextComponentString("hey ! "));
	 }	 
	 
}

The game crashes just when it starts, because of what is iin onPlayerLogsIn, probably 

IMental mental = player.getCapability(MentalProvider.Mental_CAP, null);

this returns something wrong, then we can't use it. Thank you.
PS : it displays "hey" if we comment the 3 lines before so the event works.

Edited by LaurentOutang
Link to comment
Share on other sites

Ok thank you i added it to the event bus. But there is still the issue. 
This is the crash report : 

---- Minecraft Crash Report ----
// Sorry :(

Time: 3/22/18 3:34 PM
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:28)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)


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

-- Head --
Thread: Server thread
Stacktrace:
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:28)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@3ffdf436
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 542299088 bytes (517 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID        | Version      | Source                           | Signature |
	|:--------- |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | hm        | 1.0          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 1 / 8; [EntityPlayerMP['Player149'/181, l='New World', x=287.43, y=77.00, z=-169.72]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

 

Edited by LaurentOutang
Link to comment
Share on other sites

With null pointer exceptions, something is null and being used.  In general one should check references before using them.

 

So, looking at the above code what comes to my mind is "what if the player doesn't have the capability?"

 

You should be able to set a breakpoint at the line given in the error and see what is null, and then work backwards to see what went wrong.  I'm betting on "mental"

Link to comment
Share on other sites

Yep the problem is that mental is null, i post edited code :

EventHandler.java

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.IMental;
import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class EventHandler {

	 @SubscribeEvent
	 public static void onPlayerLogsIn(PlayerLoggedInEvent event)
	 {

		 EntityPlayer player = event.player;

		 IMental mental = player.getCapability(MentalProvider.Mental_CAP, null);
		 if(mental != null)
		 {
			 String message = String.format("mental = ", (int) mental.getMental());
			 player.sendMessage(new TextComponentString(message));
		 }		
		 player.sendMessage(new TextComponentString("hey ! "));
	 }	 
	 
}

CapabilityHandler : 

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class CapabilityHandler {
	
	 public static final ResourceLocation Mental_CAP = new ResourceLocation(Reference.MOD_ID, "mental");

	 
	 @SubscribeEvent

	 public void attachCapability(AttachCapabilitiesEvent<Entity> event)
	 {
		 if (event.getObject() instanceof EntityPlayer)
			 event.addCapability(Mental_CAP, new MentalProvider());	

	 }
}

 

Link to comment
Share on other sites

There's too much code not shown.

 

But, what capability does MentalProvider provide?  Looking at code that I've written, the provider wanted an implementation to associate with the entity.
This object needed to be created and passed into the provider's constructor.

 

Without this, it isn't clear what getCapability should later return.

Link to comment
Share on other sites

code :
in the main, pre init function : 

@EventHandler
	public static void PreInit(FMLPreInitializationEvent event)
	{
		CapabilityManager.INSTANCE.register(IMental.class, new MentalStorage(), Mental::new);//Mental::new else deprecated
	}
	

IMental : 

package com.laurentoutang.hardmod.capabilities;

public interface IMental {

	public void consume(float points);
	public void fill(float points);
	public void setMental(float points);
	public float getMental();
}

Mental :
 

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.INBTSerializable;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class Mental implements IMental{

	private float mental;
	
	
	public Mental(float mental)
	{
		this.mental = mental;
	}
	public Mental()
	{
		
	}
	
	@Override
	public void consume(float points) {
		if(mental-points < 0)
			mental = 0;
		else
			mental -= points;
	}

	@Override
	public void fill(float points) {
		if(mental + points > 100)
			mental = 100;
		else
			mental += points;
	}

	@Override
	public void setMental(float points) {
		mental = points;
	}

	@Override
	public float getMental() {
		return mental;
	}	

}

MentalProvider :
 

package com.laurentoutang.hardmod.capabilities;

import java.util.concurrent.Callable;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.common.capabilities.Capability.IStorage;

public class MentalProvider implements ICapabilitySerializable<NBTBase>{

	 @CapabilityInject(IMental.class)

	 public static final Capability<IMental> Mental_CAP = null;

	 
	 private IMental instance = Mental_CAP.getDefaultInstance();

	 
	 @Override
	 public boolean hasCapability(Capability<?> capability, EnumFacing facing)
	 {

		 return capability == Mental_CAP;

	 }

	 
	 @Override
	 public <T> T getCapability(Capability<T> capability, EnumFacing facing)
	 {
		 System.out.println("capability == Mental_CAP = " + (capability == Mental_CAP));
		 if (Mental_CAP != null && capability == Mental_CAP)return (T)Mental_CAP;
		 return null;
	 }
	 
	 
	 @Override
	 public NBTBase serializeNBT()
	 {

		 return Mental_CAP.getStorage().writeNBT(Mental_CAP, this.instance, null);

	 }

	 
	 @Override
	 public void deserializeNBT(NBTBase nbt)
	 {

		 Mental_CAP.getStorage().readNBT(Mental_CAP, this.instance, null, nbt);

	 } 

}

MentalStorage : 
 

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.Capability.IStorage;
import net.minecraftforge.common.capabilities.CapabilityManager;

public class MentalStorage implements IStorage<IMental>{
	
	 @Override
	 public NBTBase writeNBT(Capability<IMental> capability, IMental instance, EnumFacing side)
	 {
		 return new NBTTagFloat(instance.getMental());
	 }

	 
	 @Override
	 public void readNBT(Capability<IMental> capability, IMental instance, EnumFacing side, NBTBase nbt)
	 {
		 instance.setMental(((NBTPrimitive) nbt).getFloat());
	 }
	 
	
}

CapabilityHandler : 
 

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class CapabilityHandler {
	
	 public static final ResourceLocation Mental_CAP = new ResourceLocation(Reference.MOD_ID, "mental");

	 
	 @SubscribeEvent

	 public static void attachCapability(AttachCapabilitiesEvent<Entity> event)
	 {
		 if (event.getObject() instanceof EntityPlayer)
		 {
			 event.addCapability(Mental_CAP, new MentalProvider());	
		 }

	 }
}

before the crash : 

2018-03-23 11:56:03,209 main WARN Disabling terminal, you're running in an unsupported environment.
[11:56:03] [main/INFO] [GradleStart]: Extra: []
[11:56:03] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Michael/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[11:56:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[11:56:03] [main/INFO] [FML]: Forge Mod Loader version 14.23.2.2629 for Minecraft 1.12.2 loading
[11:56:03] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_161, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_161
[11:56:03] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[11:56:03] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[11:56:03] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[11:56:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[11:56:03] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[11:56:03] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[11:56:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:56:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:56:05] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[11:56:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:56:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[11:56:06] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[11:56:06] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[11:56:06] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[11:56:06] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[11:56:08] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: Player931
[11:56:13] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[11:56:13] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4
[11:56:14] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 790727880 bytes (754 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: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.24' Renderer: 'GeForce GTX 970/PCIe/SSE2'
[11:56:14] [main/INFO] [FML]: MinecraftForge v14.23.2.2629 Initialized
[11:56:14] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[11:56:14] [main/INFO] [FML]: Replaced 1036 ore ingredients
[11:56:15] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[11:56:15] [main/INFO] [FML]: Searching C:\Users\Michael\Desktop\MINECRAFT_DVLT\run\mods for mods
[11:56:15] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[11:56:16] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, hm] at CLIENT
[11:56:16] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, hm] at SERVER
[11:56:16] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Hard Mod
[11:56:16] [main/INFO] [FML]: Processing ObjectHolder annotations
[11:56:17] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[11:56:17] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[11:56:17] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[11:56:17] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 86005768 nanos
[11:56:17] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[11:56:17] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[11:56:17] [main/INFO] [FML]: Applying holder lookups
[11:56:17] [main/INFO] [FML]: Holder lookups applied
[11:56:17] [main/INFO] [FML]: Applying holder lookups
[11:56:17] [main/INFO] [FML]: Holder lookups applied
[11:56:17] [main/INFO] [FML]: Applying holder lookups
[11:56:17] [main/INFO] [FML]: Holder lookups applied
[11:56:17] [main/INFO] [FML]: Applying holder lookups
[11:56:17] [main/INFO] [FML]: Holder lookups applied
[11:56:17] [main/INFO] [FML]: Injecting itemstacks
[11:56:17] [main/INFO] [FML]: Itemstack injection complete
[11:56:17] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: OUTDATED Target: 14.23.2.2632
[11:56:21] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Starting up SoundSystem...
[11:56:21] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: Initializing LWJGL OpenAL
[11:56:21] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[11:56:21] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: OpenAL initialized.
[11:56:21] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Sound engine started
[11:56:27] [main/INFO] [FML]: Max texture size: 16384
[11:56:28] [main/INFO] [net.minecraft.client.renderer.texture.TextureMap]: Created: 512x512 textures-atlas
[11:56:29] [main/INFO] [FML]: Applying holder lookups
[11:56:29] [main/INFO] [FML]: Holder lookups applied
[11:56:30] [main/INFO] [FML]: Injecting itemstacks
[11:56:30] [main/INFO] [FML]: Itemstack injection complete
[11:56:30] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[11:56:30] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[11:56:30] [main/INFO] [com.mojang.text2speech.NarratorWindows]: Narrator library for x64 successfully loaded
[11:56:31] [Realms Notification Availability checker #1/INFO] [com.mojang.realmsclient.client.RealmsClient]: Could not authorize you against Realms server: Invalid session id

after the crash (when i go in the solo world after loading):

[11:57:32] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Starting integrated minecraft server version 1.12.2
[11:57:32] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Generating keypair
[11:57:32] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
[11:57:33] [Server thread/INFO] [FML]: Applying holder lookups
[11:57:33] [Server thread/INFO] [FML]: Holder lookups applied
[11:57:33] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@12be7502)
[11:57:33] [Server thread/INFO] [net.minecraft.advancements.AdvancementList]: Loaded 488 advancements
[11:57:34] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@12be7502)
[11:57:34] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@12be7502)
[11:57:34] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing start region for level 0
[11:57:35] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing spawn area: 23%
[11:57:35] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Changing view distance to 12, from 10
[11:57:37] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[11:57:37] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[11:57:37] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : minecraft@1.12.2,FML@8.0.99.99,hm@1.0,forge@14.23.2.2629,mcp@9.42
[11:57:37] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[11:57:37] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[11:57:37] [Server thread/INFO] [net.minecraft.server.management.PlayerList]: Player931[local:E:a8e8e98f] logged in with entity id 183 at (294.7117885250885, 77.0, -168.90464750034835)
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Player931 joined the game
[11:57:37] [Server thread/INFO] [STDOUT]: [com.laurentoutang.hardmod.capabilities.MentalProvider:getCapability:37]: capability == Mental_CAP = true
[11:57:37] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.PlayerEvent$PlayerLoggedInEvent@46f5b1d1:
java.lang.ClassCastException: net.minecraftforge.common.capabilities.Capability cannot be cast to com.laurentoutang.hardmod.capabilities.IMental
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:25) ~[EventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574) [FMLCommonHandler.class:?]
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228) [PlayerList.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208) [NetworkDispatcher$1.class:?]
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) [NetworkManager.class:?]
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197) [NetworkSystem.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863) [MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) [MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
[11:57:37] [Server thread/ERROR] [FML]: Index: 2 Listeners:
[11:57:37] [Server thread/ERROR] [FML]: 0: NORMAL
[11:57:37] [Server thread/ERROR] [FML]: 1: ASM: forge playerLogin(Lnet/minecraftforge/fml/common/gameevent/PlayerEvent$PlayerLoggedInEvent;)V
[11:57:37] [Server thread/ERROR] [FML]: 2: ASM: class com.laurentoutang.hardmod.util.handlers.EventHandler onPlayerLogsIn(Lnet/minecraftforge/fml/common/gameevent/PlayerEvent$PlayerLoggedInEvent;)V
[11:57:37] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking memory connection
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:212) ~[NetworkSystem.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) ~[MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
Caused by: java.lang.ClassCastException: net.minecraftforge.common.capabilities.Capability cannot be cast to com.laurentoutang.hardmod.capabilities.IMental
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:25) ~[EventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) ~[EventBus.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574) ~[FMLCommonHandler.class:?]
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228) ~[PlayerList.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259) ~[NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72) ~[NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208) ~[NetworkDispatcher$1.class:?]
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) ~[NetworkManager.class:?]
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197) ~[NetworkSystem.class:?]
	... 5 more
[11:57:37] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: This crash report has been saved to: C:\Users\Michael\Desktop\MINECRAFT_DVLT\run\.\crash-reports\crash-2018-03-23_11.57.37-server.txt
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/the_nether
[11:57:37] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/the_end
[11:57:38] [Server thread/INFO] [FML]: Unloading dimension 0
[11:57:38] [Server thread/INFO] [FML]: Unloading dimension -1
[11:57:38] [Server thread/INFO] [FML]: Unloading dimension 1
[11:57:38] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 3/23/18 11:57 AM
Description: Ticking memory connection

java.lang.ClassCastException: net.minecraftforge.common.capabilities.Capability cannot be cast to com.laurentoutang.hardmod.capabilities.IMental
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:25)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)


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

-- Head --
Thread: Client thread
Stacktrace:
	at com.laurentoutang.hardmod.util.handlers.EventHandler.onPlayerLogsIn(EventHandler.java:25)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_EventHandler_onPlayerLogsIn_PlayerLoggedInEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@21393b43
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 542608664 bytes (517 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID        | Version      | Source                           | Signature |
	|:--------- |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | hm        | 1.0          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 1 / 8; [EntityPlayerMP['Player931'/183, l='New World', x=294.71, y=77.00, z=-168.90]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'
[11:57:38] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2018-03-23_11.57.37-server.txt
[11:57:38] [main/INFO] [FML]: Waiting for the server to terminate/save.
[11:57:39] [pool-2-thread-1/WARN] [com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@239e7409[id=baf6de3a-5bd7-32fc-ab9f-e6b63b25393f,name=Player931,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:79) ~[YggdrasilAuthenticationService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
	at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3188) [Minecraft.class:?]
	at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
[11:57:39] [Server thread/INFO] [FML]: Applying holder lookups
[11:57:39] [Server thread/INFO] [FML]: Holder lookups applied
[11:57:39] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[11:57:39] [main/INFO] [FML]: Server terminated.
[11:57:39] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[11:57:39] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release


 

Edited by LaurentOutang
Link to comment
Share on other sites

is that better 

 @Override
	 public <T> T getCapability(Capability<T> capability, EnumFacing facing)
	 {
		 System.out.println("capability == Mental_CAP = " + (capability == Mental_CAP));
		 if (Mental_CAP != null && capability == Mental_CAP) return Mental_CAP.<T> cast(this.instance);
		 return null;
	 }

With this i have this in crash folder :
 

---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 3/23/18 12:15 PM
Description: Initializing game

java.lang.RuntimeException: One of more entry values did not copy to the correct id. Check log for details!
	at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:543)
	at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:490)
	at net.minecraftforge.registries.GameData.freezeData(GameData.java:225)
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:730)
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352)
	at net.minecraft.client.Minecraft.init(Minecraft.java:581)
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


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

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:543)
	at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:490)
	at net.minecraftforge.registries.GameData.freezeData(GameData.java:225)
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:730)
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352)
	at net.minecraft.client.Minecraft.init(Minecraft.java:581)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 711042600 bytes (678 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: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State  | ID        | Version      | Source                           | Signature |
	|:------ |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJA | hm        | 1.0          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.24' Renderer: 'GeForce GTX 970/PCIe/SSE2'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 970/PCIe/SSE2 GL version 4.6.0 NVIDIA 391.24, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 4x Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz

 

Link to comment
Share on other sites

Here is the latest log 

[19:01:07] [main/INFO] [GradleStart]: Extra: []
[19:01:07] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Michael/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[19:01:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[19:01:07] [main/INFO] [FML]: Forge Mod Loader version 14.23.2.2629 for Minecraft 1.12.2 loading
[19:01:07] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_161, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_161
[19:01:07] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[19:01:07] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[19:01:07] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[19:01:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[19:01:07] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[19:01:07] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[19:01:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:01:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[19:01:10] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[19:01:10] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[19:01:10] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[19:01:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[19:01:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[19:01:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[19:01:11] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[19:01:12] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: Player954
[19:01:17] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[19:01:17] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4
[19:01:18] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 771241248 bytes (735 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: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.24' Renderer: 'GeForce GTX 970/PCIe/SSE2'
[19:01:18] [main/INFO] [FML]: MinecraftForge v14.23.2.2629 Initialized
[19:01:18] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[19:01:18] [main/INFO] [FML]: Replaced 1036 ore ingredients
[19:01:18] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[19:01:18] [main/INFO] [FML]: Searching C:\Users\Michael\Desktop\MINECRAFT_DVLT\run\mods for mods
[19:01:19] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[19:01:20] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, hm] at CLIENT
[19:01:20] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, hm] at SERVER
[19:01:20] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 194076341 nanos
[19:01:20] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Hard Mod
[19:01:21] [main/INFO] [FML]: Processing ObjectHolder annotations
[19:01:21] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[19:01:21] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[19:01:21] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[19:01:21] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[19:01:21] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[19:01:21] [main/INFO] [FML]: Applying holder lookups
[19:01:21] [main/INFO] [FML]: Holder lookups applied
[19:01:21] [main/INFO] [FML]: Applying holder lookups
[19:01:21] [main/INFO] [FML]: Holder lookups applied
[19:01:21] [main/INFO] [FML]: Applying holder lookups
[19:01:21] [main/INFO] [FML]: Holder lookups applied
[19:01:21] [main/INFO] [FML]: Applying holder lookups
[19:01:21] [main/INFO] [FML]: Holder lookups applied
[19:01:21] [main/INFO] [FML]: Injecting itemstacks
[19:01:21] [main/INFO] [FML]: Itemstack injection complete
[19:01:21] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: OUTDATED Target: 14.23.2.2632
[19:01:25] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Starting up SoundSystem...
[19:01:25] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: Initializing LWJGL OpenAL
[19:01:25] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[19:01:25] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: OpenAL initialized.
[19:01:26] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Sound engine started
[19:01:32] [main/INFO] [FML]: Max texture size: 16384
[19:01:32] [main/INFO] [net.minecraft.client.renderer.texture.TextureMap]: Created: 512x512 textures-atlas
[19:01:35] [main/ERROR] [FML]: Parsing error loading recipe hm:golden_sushi
com.google.gson.JsonSyntaxException: Unknown item 'hm:sushi'
	at net.minecraftforge.common.crafting.CraftingHelper.getItemStackBasic(CraftingHelper.java:259) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$init$16(CraftingHelper.java:536) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.getIngredient(CraftingHelper.java:201) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$init$14(CraftingHelper.java:473) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:408) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:710) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:821) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:667) ~[CraftingHelper.class:?]
	at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_161]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:619) [CraftingHelper.class:?]
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:718) [Loader.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:581) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
[19:01:35] [main/ERROR] [FML]: Parsing error loading recipe hm:sushi_recipe
com.google.gson.JsonSyntaxException: Unknown item 'hm:sushi'
	at net.minecraftforge.common.crafting.CraftingHelper.getItemStack(CraftingHelper.java:211) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$init$14(CraftingHelper.java:515) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:408) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:710) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:821) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:667) ~[CraftingHelper.class:?]
	at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_161]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:619) [CraftingHelper.class:?]
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:718) [Loader.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:581) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
[19:01:35] [main/INFO] [FML]: Applying holder lookups
[19:01:35] [main/INFO] [FML]: Holder lookups applied
[19:01:35] [main/INFO] [FML]: Injecting itemstacks
[19:01:35] [main/INFO] [FML]: Itemstack injection complete
[19:01:35] [main/WARN] [FML]: Registry Item: Override did not have an associated owner object. Name: hm:vegetable_soup Value: com.laurentoutang.hardmod.items.ItemFoodBase@105b12e7
[19:01:35] [main/WARN] [FML]: Registry Item: Override did not have an associated owner object. Name: hm:vegetable_soup Value: com.laurentoutang.hardmod.items.ItemFoodBase@6b54dbd8
[19:01:35] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// I'm sorry, Dave.

Time: 3/23/18 7:01 PM
Description: Initializing game

java.lang.RuntimeException: One of more entry values did not copy to the correct id. Check log for details!
	at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:543)
	at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:490)
	at net.minecraftforge.registries.GameData.freezeData(GameData.java:225)
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:730)
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352)
	at net.minecraft.client.Minecraft.init(Minecraft.java:581)
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


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

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:543)
	at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:490)
	at net.minecraftforge.registries.GameData.freezeData(GameData.java:225)
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:730)
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:352)
	at net.minecraft.client.Minecraft.init(Minecraft.java:581)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 719568912 bytes (686 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: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State  | ID        | Version      | Source                           | Signature |
	|:------ |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJA | hm        | 1.0          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.24' Renderer: 'GeForce GTX 970/PCIe/SSE2'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 970/PCIe/SSE2 GL version 4.6.0 NVIDIA 391.24, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 4x Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
[19:01:35] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Michael\Desktop\MINECRAFT_DVLT\run\.\crash-reports\crash-2018-03-23_19.01.35-client.txt

 

Link to comment
Share on other sites

Ok I fixed it, nothing to do with capabilities. But now with the same code that I recently posted, I have the nullpointerexecption again

---- Minecraft Crash Report ----
// Oops.

Time: 3/23/18 8:51 PM
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
	at com.laurentoutang.hardmod.capabilities.MentalProvider.<init>(MentalProvider.java:22)
	at com.laurentoutang.hardmod.util.handlers.CapabilityHandler.attachCapability(CapabilityHandler.java:26)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_CapabilityHandler_attachCapability_AttachCapabilitiesEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:656)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:626)
	at net.minecraft.entity.Entity.<init>(Entity.java:267)
	at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:213)
	at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:192)
	at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:181)
	at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:537)
	at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:139)
	at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:67)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)


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

-- Head --
Thread: Server thread
Stacktrace:
	at com.laurentoutang.hardmod.capabilities.MentalProvider.<init>(MentalProvider.java:22)
	at com.laurentoutang.hardmod.util.handlers.CapabilityHandler.attachCapability(CapabilityHandler.java:26)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_CapabilityHandler_attachCapability_AttachCapabilitiesEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:656)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:626)
	at net.minecraft.entity.Entity.<init>(Entity.java:267)
	at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:213)
	at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:192)
	at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:181)
	at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:537)
	at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:139)
	at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:67)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@4ee32b52
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 603561752 bytes (575 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID        | Version      | Source                           | Signature |
	|:--------- |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | hm        | 1.0          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 0 / 8; []
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

 

Link to comment
Share on other sites

Mental.java

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.INBTSerializable;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class Mental implements IMental{

	private float mental=20.f;
	
	
	public Mental(float mental)
	{
		this.mental = mental;
	}
	public Mental()
	{
		
	}
	
	@Override
	public void consume(float points) {
		if(mental-points < 0)
			mental = 0;
		else
			mental -= points;
	}

	@Override
	public void fill(float points) {
		if(mental + points > 100)
			mental = 100;
		else
			mental += points;
	}

	@Override
	public void setMental(float points) {
		mental = points;
	}

	@Override
	public float getMental() {
		return mental;
	}	

}

MentalProvider :

package com.laurentoutang.hardmod.capabilities;

import java.util.concurrent.Callable;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.common.capabilities.Capability.IStorage;

public class MentalProvider implements ICapabilitySerializable<NBTBase>{

	@CapabilityInject(IMental.class)

	 public static final Capability<IMental> Mental_CAP = null;

	 
	 private IMental instance = Mental_CAP.getDefaultInstance();

	 
	 @Override
	 public boolean hasCapability(Capability<?> capability, EnumFacing facing)
	 {

		 return capability == Mental_CAP;

	 }

	 
	 @Override
	 public <T> T getCapability(Capability<T> capability, EnumFacing facing)
	 {
		 if (Mental_CAP != null && capability == Mental_CAP) return Mental_CAP.<T> cast(this.instance);
		 return null;
	 }
	 
	 
	 @Override
	 public NBTBase serializeNBT()
	 {

		 return Mental_CAP.getStorage().writeNBT(Mental_CAP, this.instance, null);

	 }

	 
	 @Override
	 public void deserializeNBT(NBTBase nbt)
	 {

		 Mental_CAP.getStorage().readNBT(Mental_CAP, this.instance, null, nbt);

	 } 

}

MentalStorage :

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.Capability.IStorage;
import net.minecraftforge.common.capabilities.CapabilityManager;

public class MentalStorage implements IStorage<IMental>{

	
	 @Override
	 public NBTBase writeNBT(Capability<IMental> capability, IMental instance, EnumFacing side)
	 {
		 return new NBTTagFloat(instance.getMental());
	 }

	 
	 @Override
	 public void readNBT(Capability<IMental> capability, IMental instance, EnumFacing side, NBTBase nbt)
	 {
		 instance.setMental(((NBTPrimitive) nbt).getFloat());
	 }
	
}

CapabilityHandler

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class CapabilityHandler {
	
	 public static final ResourceLocation Mental_CAP = new ResourceLocation(Reference.MOD_ID, "mental");

	 
	 @SubscribeEvent

	 public static void attachCapability(AttachCapabilitiesEvent<Entity> event)
	 {
		 if (event.getObject() instanceof EntityPlayer)
		 {
			 event.addCapability(Mental_CAP, new MentalProvider());	
		 }
	 }
}

EventHandler :

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.IMental;
import com.laurentoutang.hardmod.capabilities.MentalProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class EventHandler {

	@SubscribeEvent
	 public static void onPlayerLogsIn(PlayerLoggedInEvent event)
	 {

		 EntityPlayer player = event.player;

		IMental mental = player.getCapability(MentalProvider.Mental_CAP, null);
		 if(mental != null)
		 {
			 mental.fill(1.f);
			 String message = String.format("Logged in : mental = " + mental.getMental());
			 player.sendMessage(new TextComponentString(message));
		 }		
		 player.sendMessage(new TextComponentString("hey ! "));
	 }	 
	 @SubscribeEvent
	 public static void onPlayerSleeping(PlayerInteractEvent event)
	 {
		 EntityPlayer player = event.getEntityPlayer();
		 if(event.getHand() == EnumHand.MAIN_HAND)
		 {
			 IMental mental = player.getCapability(MentalProvider.Mental_CAP, null);
			 if(mental != null)
			 {
				 mental.fill(1.f);
				 String message = String.format("Player interact mental = " + mental.getMental());
				 player.sendMessage(new TextComponentString(message));
			 }	
		 }
		 	
	 }
	 
}


Well in game, when I log in, I see a value of mental that increase at each connection but it started from 0, and when i interact with the left click, there is another mental that starts at 0 at each connection even if it increased the session before...

Can you tell me how can I do to  put a value to the mental at the begining and then use the same mental in all the events.

For example, if I would that :

-a new player get 100 points of mental

-at each night the mental drops 5 points

-at each logging in, a message is sent to the player displaying the amount of remaining mental.
Thanks for your help

Link to comment
Share on other sites

I added getters in Mental because i added a variable temperature 

package com.laurentoutang.hardmod.capabilities;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.INBTSerializable;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class MentalTemperature implements IMentalTemperature{

	private float mental = 100.f;
	private float temperature = 100.f;
	
	public MentalTemperature(float mental, float temperature)
	{
		this.mental = mental;
		this.temperature = temperature;
	}
	public MentalTemperature()
	{
		
	}
	
	@Override
	public void consumeMental(float points) 
	{
		if(mental-points < 0)
			mental = 0;
		else
			mental -= points;
	}

	@Override
	public void fillMental(float points) 
	{
		if(mental + points > 100)
			mental = 100;
		else
			mental += points;
	}

	@Override
	public void setMental(float points) 
	{
		mental = points;
	}

	@Override
	public float getMental() 
	{
		return mental;
	}	

	public void consumeTemperature(float points)
	{
		if(temperature-points < 0)
			temperature = 0;
		else
			temperature -= points;
	}
	public void fillTemperature(float points)
	{
		if(temperature + points > 100)
			temperature = 100;
		else
			temperature += points;
	}
	public void setTemperature(float points)
	{
		temperature = points;
	}
	public float getTemperature()
	{
		return temperature;
	}
}

and then i tried to sync as you said but the game crashes : null pointer exception

MessageCapabilitiesHandler:

package com.laurentoutang.hardmod.util.handlers;

import java.util.List;

import com.laurentoutang.hardmod.capabilities.IMentalTemperature;
import com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider;

import Network.MessageCapabilities;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.IThreadListener;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;


@EventBusSubscriber(value = Side.CLIENT)
public class MessageCapabilitiesHandler implements IMessageHandler<MessageCapabilities, IMessage>{

	@Override
	public IMessage onMessage(MessageCapabilities message, MessageContext ctx) 
	{
		
		
		final float mental = message.getMental();//nothing to do with it for the moment
		final float temperature = message.getTemperature();//same
		Minecraft minecraft = Minecraft.getMinecraft();
	    final WorldClient worldClient = minecraft.world;
	    minecraft.addScheduledTask(new Runnable()
	    {
	      public void run() {
	        processMessage(worldClient, message);
	      }
	    });
		return null;
	}
	 void processMessage(WorldClient worldClient, MessageCapabilities message)
	  {
		List<EntityPlayer> players = worldClient.playerEntities;
	    for(int i = 0; i < players.size(); i++)
	    {
	    	players.get(i).sendMessage(new TextComponentString("You have " + message.getMental() + " mental left and " + message.getTemperature() + " temperature left"));
	    }
	    return;
	  }


}

packetHandler:

package com.laurentoutang.hardmod.util.handlers;

import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;

public class PacketHandler {
	public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel("hm");
}

MessageCapabilities:

package Network;

import io.netty.buffer.ByteBuf;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class MessageCapabilities implements IMessage{
	
	private float mentalToSend, temperatureToSend;
	
	public MessageCapabilities() {}
	
	public MessageCapabilities(float mentalToSend, float temperatureToSend)
	{
		this.mentalToSend = mentalToSend;
		this.temperatureToSend = temperatureToSend;
	}
	
	@Override
	public void fromBytes(ByteBuf buf) 
	{
		this.mentalToSend = buf.readFloat();
		this.temperatureToSend = buf.readFloat();	
	}

	@Override
	public void toBytes(ByteBuf buf) 
	{
		buf.writeFloat(this.mentalToSend);
		buf.writeFloat(this.temperatureToSend);		
	}
	public float getMental()
	{
		return mentalToSend;
	}
	public float getTemperature()
	{
		return temperatureToSend;
	}

}

client proxy:

package com.laurentoutang.hardmod.proxy;

import com.laurentoutang.hardmod.capabilities.IMentalTemperature;
import com.laurentoutang.hardmod.capabilities.MentalTemperature;
import com.laurentoutang.hardmod.capabilities.MentalTemperatureStorage;
import com.laurentoutang.hardmod.util.handlers.CapabilityHandler;
import com.laurentoutang.hardmod.util.handlers.MessageCapabilitiesHandler;
import com.laurentoutang.hardmod.util.handlers.PacketHandler;

import Network.MessageCapabilities;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.util.IThreadListener;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;

public class ClientProxy extends CommonProxy {
	
	public void init() 
	{		
		CapabilityManager.INSTANCE.register(IMentalTemperature.class, new MentalTemperatureStorage(), MentalTemperature::new);
		MinecraftForge.EVENT_BUS.register(new MessageCapabilitiesHandler());
	}
	public IThreadListener getListener(MessageContext ctx) {
		return ctx.side == Side.CLIENT ? Minecraft.getMinecraft() : super.getListener(ctx);
	}

	public EntityPlayer getPlayer(MessageContext ctx) {
		return ctx.side == Side.CLIENT ? Minecraft.getMinecraft().player : super.getPlayer(ctx);
	}
	public void registerItemRenderer(Item item, int meta, String id) 
	{
		ModelLoader.setCustomModelResourceLocation(item,  meta,  new ModelResourceLocation(item.getRegistryName(), id));
	}
}

common proxy:

package com.laurentoutang.hardmod.proxy;


import com.laurentoutang.hardmod.util.handlers.MessageCapabilitiesHandler;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.util.IThreadListener;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class CommonProxy 
{
	public void init() {
		
	}
	
	public IThreadListener getListener(MessageContext ctx) {
		return (WorldServer) ctx.getServerHandler().player.getServerWorld();
	}

	public EntityPlayer getPlayer(MessageContext ctx) {
		return ctx.getServerHandler().player;
	}
	public void registerItemRenderer(Item item, int meta, String id)
	{
		
	}
	
}

If I understood well, MessageCapabilities is the packet, and when we get the packet, MessageCapabilitiesHandler::onMessage is executed ? but when do we know when the packet is sent...
I trie something like that :

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.IMentalTemperature;
import com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider;

import Network.MessageCapabilities;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
import net.minecraftforge.fml.relauncher.Side;
@EventBusSubscriber
public class EventPlayerTick {
	@SubscribeEvent
	public void onPlayerTick(PlayerTickEvent event) {
		if(event.side == Side.SERVER) {
			EntityPlayer player = event.player;
	        IMentalTemperature capabilities = player.getCapability(MentalTemperatureProvider.MentalTemperature_CAP, null);
			PacketHandler.NETWORK.sendTo(new MessageCapabilities(capabilities.getMental(), capabilities.getTemperature()), (EntityPlayerMP) player);
		}	
	}
}

But the game crashes. I just want to give to each player two floats (mental and temperature), then modify these floats when there is special event. The same as life or hunger. Thank you for your help

Link to comment
Share on other sites

---- Minecraft Crash Report ----
// My bad.

Time: 3/25/18 1:34 AM
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
	at com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider.<init>(MentalTemperatureProvider.java:22)
	at com.laurentoutang.hardmod.util.handlers.CapabilityHandler.attachCapability(CapabilityHandler.java:26)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_CapabilityHandler_attachCapability_AttachCapabilitiesEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:656)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:626)
	at net.minecraft.entity.Entity.<init>(Entity.java:267)
	at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:213)
	at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:192)
	at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:181)
	at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:537)
	at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:139)
	at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:67)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)


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

-- Head --
Thread: Server thread
Stacktrace:
	at com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider.<init>(MentalTemperatureProvider.java:22)
	at com.laurentoutang.hardmod.util.handlers.CapabilityHandler.attachCapability(CapabilityHandler.java:26)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_CapabilityHandler_attachCapability_AttachCapabilitiesEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:656)
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:626)
	at net.minecraft.entity.Entity.<init>(Entity.java:267)
	at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:213)
	at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:192)
	at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:181)
	at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:537)
	at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:139)
	at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:67)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@43b0ef6d
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_161, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 606365760 bytes (578 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.42 Powered by Forge 14.23.2.2629 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID        | Version      | Source                           | Signature |
	|:--------- |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | forge     | 14.23.2.2629 | forgeSrc-1.12.2-14.23.2.2629.jar | None      |
	| UCHIJAAAA | hm        | 1.1          | bin                              | None      |

	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 0 / 8; []
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

Here's the crash report

Link to comment
Share on other sites

It was a problem about CapabilityHandler, I fixed it:

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider;
import com.laurentoutang.hardmod.util.Reference;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class CapabilityHandler {
	
	 public static final ResourceLocation MentalTemperature_CAP = new ResourceLocation(Reference.MOD_ID, "mentaltemperature");

	 
	 @SubscribeEvent

	 public static void attachCapability(AttachCapabilitiesEvent<Entity> event)
	 {
		 if (event.getObject() instanceof EntityPlayer)
		 {
			 event.addCapability(MentalTemperature_CAP, new MentalTemperatureProvider());	
		 }
	 }
}

But capabilities are not sync when I use events:
 

package com.laurentoutang.hardmod.util.handlers;

import com.laurentoutang.hardmod.capabilities.IMentalTemperature;
import com.laurentoutang.hardmod.capabilities.MentalTemperatureProvider;
import com.laurentoutang.hardmod.util.Reference;

import Network.MessageCapabilities;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import net.minecraftforge.fml.relauncher.Side;

@EventBusSubscriber
public class EventHandler {

	@SubscribeEvent
	 public static void onPlayerLogsIn(PlayerLoggedInEvent event)
	 {

		 EntityPlayer player = event.player;

		 
		 
		 IMentalTemperature capabilities = player.getCapability(MentalTemperatureProvider.MentalTemperature_CAP, null);
		 if(capabilities != null)
		 {
			 capabilities.consumeMental(2.f);
			 String message = String.format("Logged in : mental = " + capabilities.getMental());
			 player.sendMessage(new TextComponentString(message));
		 }		
	 }	 
	 @SubscribeEvent
	 public static void onPlayerInteract(PlayerInteractEvent event)
	 {
		 EntityPlayer player = event.getEntityPlayer();
		 if(event.getHand() == EnumHand.MAIN_HAND)
		 {
			 IMentalTemperature capabilities = player.getCapability(MentalTemperatureProvider.MentalTemperature_CAP, null);
			 if(capabilities != null)
			 {
				 capabilities.consumeMental(1.f);
				 String message = String.format("Player interact mental = " + capabilities.getMental());
				 player.sendMessage(new TextComponentString(message));
			 }	
		 }
		 	
	 }
	 
}

How am I supposed to use packets with capabilities (if the previous code was correct) please ?

Link to comment
Share on other sites

2 hours ago, LaurentOutang said:

MentalTemperatureProvider

Post this class

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

package com.laurentoutang.hardmod.capabilities;

import java.util.concurrent.Callable;

import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTPrimitive;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.common.capabilities.Capability.IStorage;

public class MentalTemperatureProvider implements ICapabilitySerializable<NBTBase>{

	@CapabilityInject(IMentalTemperature.class)

	 public static final Capability<IMentalTemperature> MentalTemperature_CAP = null;

	 
	 private IMentalTemperature instance = MentalTemperature_CAP.getDefaultInstance();

	 
	 @Override
	 public boolean hasCapability(Capability<?> capability, EnumFacing facing)
	 {

		 return capability == MentalTemperature_CAP;

	 }

	 
	 @Override
	 public <T> T getCapability(Capability<T> capability, EnumFacing facing)
	 {
		 if (MentalTemperature_CAP != null && capability == MentalTemperature_CAP) return MentalTemperature_CAP.<T> cast(this.instance);
		 return null;
	 }
	 
	 
	 @Override
	 public NBTBase serializeNBT()
	 {

		 return MentalTemperature_CAP.getStorage().writeNBT(MentalTemperature_CAP, this.instance, null);

	 }

	 
	 @Override
	 public void deserializeNBT(NBTBase nbt)
	 {

		 MentalTemperature_CAP.getStorage().readNBT(MentalTemperature_CAP, this.instance, null, nbt);

	 } 

}

 

Link to comment
Share on other sites

54 minutes ago, LaurentOutang said:

public static final Capability<IMentalTemperature> MentalTemperature_CAP = null;
private IMentalTemperature instance = MentalTemperature_CAP.getDefaultInstance();

 

That second line runs immediately after the first.

What do you expect to happen?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
    • I am unable to do that. Brigadier is a mojang library that parses commands.
    • Hi, i appreciate the answer. I would love to do that, but we have active players with all their belongings in SSN. Also this mod is really handy and they would be mad if we removed it. Are you really certain that SSN is causing this? It would require lots of work to test it and SSN was not really an issue before we removed Fast Suite. Can it be related somehow? I will provide you with log before removing FS. PasteBin: https://pastebin.com/Y5EpLpNe (crash before removing Fast Suite, which I suspected to be a problem from some crash before)
    • Backup the world and make a test without storagenetwork
  • Topics

×
×
  • Create New...

Important Information

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