Jump to content

Recommended Posts

Posted

Hello,

 

I'm writing a RPG mod. and i'm currenty stuck at the part with how to add Xp if you mine a block and how to stop

breaking a block if you not have the required level.

 

yeah i know i'm not a good Java coder if you see my codes but I will become better.

 

i'm currently stuck at the part writing the eventHandler.

my first problem is how to let the XP gains works

and my second problem is how to cancel the BreakEvent when the required level is higher that your level.

and now if i mine a block with a Req lvl higher than my level. the block will break and turned into a ghost block. by re-entering the world the block will become normal again.

for me it looks like the block will be mined for the client. but not for the server.

 

here are my codes of my Main file and My EventHandler File and also For my XP problems the codes of my gui file where the xp codes are putted in:

MainRegistry.class:

 

 

package com.modMark.Main;

import com.modMark.lib.revStrings;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;

@Mod(modid = "mark13695", name = "Mark's Mod", version = "0.0.1")
public class MainRegistry {

@Mod.Instance("mark13695")
public static MainRegistry instance;

@SidedProxy(clientSide = "com.modMark.Main.ClientProxy", serverSide = "com.modMark.Main.ServerProxy" )
public static ServerProxy proxy;


@EventHandler
public static void PreLoad(FMLPreInitializationEvent PreEvent){
	proxy.registerRenderInfo();
	MinecraftForge.EVENT_BUS.register(new MarkKeyBindings());
        MarkKeyBindings.init();
        
}
@EventHandler
public static void Load(FMLInitializationEvent Event){

	NetworkRegistry.INSTANCE.registerGuiHandler(instance, new IGuiHandlerMark());
	MinecraftForge.EVENT_BUS.register(new EventHandlerMark());

}
@EventHandler
public static void PostLoad(FMLPostInitializationEvent PostEvent){

}
}

 

EventHandlerMark.class:

 

package com.modMark.Main;

import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import scala.reflect.internal.Trees.ThisSubstituter;

public class EventHandlerMark {

public static int ID;
public static int ReqLvl;
public static int getXp;



@SubscribeEvent
public static void BreakEvent(BreakEvent event)
{

	Block block = Block.getBlockById(ID);
	if (ID == 1){
		ReqLvl = 0;
		getXp = 8;
		}
	if (ID == 15){
		ReqLvl = 20;
		getXp = 15;
		}
	if (ID == 16){
		ReqLvl = 5;
		getXp = 12;
		}
	if (ID == 3){
		ReqLvl = 0;
		getXp = 5;
		}
if (ReqLvl > GuiStatlist.Level[8] && block.getMaterial() == Material.rock){
	event.setCanceled(true);

	}
else if
	(ReqLvl > GuiStatlist.Level[10] && block.getMaterial() == Material.sand){
	event.setCanceled(true);
}
else if( block.getMaterial() == Material.rock) {
	GuiStatlist.XP[8] += getXp;
}
else if( block.getMaterial() == Material.sand) {
	GuiStatlist.XP[10] += getXp;
}

}

 

 

 

 

 

And

GuiStatlist.class:

package com.modMark.Main;

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

import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.ResourceLocation;

public class GuiStatlist extends GuiScreen {

public GuiStatlist(){}


public static final int MainLock = 1;
public static final int XpLock1 = 0;
public static final int XpLock2 = 0;
public static final int XpLock3 = 0;
public static final int XpLock4 = 0;
public static final int XpLock5 = 0;
public static final int XpLock6 = 1;
public static final int XpLock7 = 0;


public static String[] Skill = new String[35];
public static int[] XP = new int[35];
public static double[] Level1 = new double[35];
public static int[] Level = new int[35];
public static double[] NextLevel0 = new double[35];
public static double[] NextLevel1 = new double[35];
public static int[] NextLevel = new int[35];
public static int[] XpNeed = new int[35];
public static double[] Degrees1 = new double[35];
public static double[] Degrees = new double[35];
public static int i;




 @Override
     public void drawScreen(int mouseX, int mouseY, float pticks) {
	 this.drawDefaultBackground();
	 ResourceLocation location = new ResourceLocation("mark13695", "textures/gui/skillList.png");
	 this.mc.getTextureManager().bindTexture(location);




	 /** Xp formule */


	for (i = 0; i < 35;i++) {

	 if (XP[i] == 2000000000){
			Level1[i] = 255;
		}
		else if (XP[i] >= 1720000000 && XP[i] <= 1999999999){
			Level1[i] = 254;
			}
		else if (XP[i] >= 1480000000 && XP[i] <= 1719999999){
			Level1[i] = 253;
		}
		else if (XP[i] >= 1280000000 && XP[i] <= 1479999999){
			Level1[i] = 252;
		}
		else if (XP[i] >= 1120000000 && XP[i] <= 1279999999){
			Level1[i] = 251;
		}
		else if (XP[i] >= 1000000000 && XP[i] <= 1119999999){
			Level1[i] = 250;
		}

		else if (XP[i] >= 954238196 && XP[i] <= 999999999){
			Level1[i] = 249;
		}

		else if (XP[i] >= 100005814 && XP[i] <= 954238195){
			Level1[i] = ((Math.log(XP[i] + 8287)/Math.log(8287))-1)*192+1;
		}

		else if (XP[i] >= 70404413 && XP[i] <= 100005813){
			Level1[i] = 200;
		}

		else if (XP[i] >= 701754 && XP[i] <= 70404412){
			Level1[i] = ((Math.log10(XP[i] + 7480)/Math.log10(7480))-1)*194+1;
		}
		else if (XP[i] >= 409286 && XP[i] <= 701753){
			Level1[i] = 99;
		}
		else if (XP[i] <= 409285){
			Level1[i] = ((Math.log10(XP[i] + 522)/Math.log10(522))-1)*92+1;
		}
		else {
			Level1[i] = 0;
		}

	 Level[i] = (int) Math.floor(Level1[i]); /** floors level down*/
		NextLevel0[i] = (int) (Level[i] + 1);  /** says Level + 1*/
		NextLevel[i] = (int) Math.ceil(NextLevel1[i]);
		XpNeed[i] = (int) (NextLevel[i] - XP[i]);

		if (Level[i] == 99 || Level[i] == 200 || Level[i] == 255) 
			{ Degrees[i] = 0; }
		 else {
		Degrees[i] = ((XP[i] - Math.ceil(Degrees1[i])) / (NextLevel[i] - Math.ceil(Degrees1[i]))) * 39;
	    }






		if (Level[i] < 99) {
			NextLevel1[i] = (Math.pow(522, (NextLevel0[i] - 1)/92 +1) - 522);
		}
		else if (Level[i] == 99) {
			NextLevel1[i] = 701754;
		}
		else if (Level[i] >= 100 && Level[i] < 200) {
			NextLevel1[i] = (Math.pow(7480, (NextLevel0[i] - 1)/194 +1) - 7480);
		}
		else if (Level[i] == 200) {
			NextLevel1[i] = 100005814;
		}
		else if (Level[i] >= 201 && Level[i] < 249) {
			NextLevel1[i] = (Math.pow(8287, (NextLevel0[i] - 1)/192 +1) - 8287);
		}
		else if (Level[i] == 249) {
			NextLevel1[i] = 1000000000;
		}
		else if (Level[i] == 250) {
			NextLevel1[i] = 1120000000;
		}
		else if (Level[i] == 251) {
			NextLevel1[i] = 1280000000;
		}
		else if (Level[i] == 252) {
			NextLevel1[i] = 1480000000;
		}
		else if (Level[i] == 253) {
			NextLevel1[i] = 1720000000;
		}
		else if (Level[i] == 254) {
			NextLevel1[i] = 2000000000;		
		}
		else {
			NextLevel1[i] = 0;
		}



		if (Level[i] <= 98) {
			Degrees1[i] = (Math.pow(522, (NextLevel0[i] - 2)/92 +1) - 522) ;
		}

		else if (Level[i] >= 100 && Level[i] <= 199) {
			Degrees1[i] = (Math.pow(7480, (NextLevel0[i] - 2)/194 +1) - 7480);
		}
		else if (Level[i] >= 201 && Level[i] <= 249) {
			Degrees1[i] = (Math.pow(8287, (NextLevel0[i] - 2)/192 +1) - 8287);
		}
		else if (Level[i] == 250) {
			Degrees1[i] = 1000000000;
		}
		else if (Level[i] == 251) {
			Degrees1[i] = 1120000000;
		}
		else if (Level[i] == 252) {
			Degrees1[i] = 1280000000;
		}
		else if (Level[i] == 253) {
			Degrees1[i] = 1480000000;
		}
		else if (Level[i] == 254) {
			Degrees1[i] = 1720000000;
		}

		else {
			Degrees1[i] = 0;
		}

	}	

	 /** Gui Texture loading*/


	 	float PoX = mouseX;
	 	float PoY = mouseY;
	 	int xSize = 235;
		int ySize = 211;
		int w = this.width;
		int h = this.height;
		int x = ((w - xSize)  / 2);
		int y = ((h - ySize) / 2);
		int z = 1;

		drawModalRectWithCustomSizedTexture(x, y, 0, 0, xSize, ySize, 235, 211);

		/** Progness Bars, sorry for dead codes. this are codes for when a skill is locked. will be worked on in the future */

		ResourceLocation location2 = new ResourceLocation("mark13695", "textures/gui/SkillBarL.png");
		 this.mc.getTextureManager().bindTexture(location2);

		 if (XpLock1 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 36, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock2 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 63, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock3 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 90, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock4 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 117, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock5 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 144, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock6 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 171, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }
		 if (XpLock7 == 0) {
			 drawModalRectWithCustomSizedTexture(x + 181, y + 198, 0, 0, (int) 38 , 2,(int) 38 , 2);
		 }

		ResourceLocation location3 = new ResourceLocation("mark13695", "textures/gui/SkillBar.png");
		 this.mc.getTextureManager().bindTexture(location3);


		drawModalRectWithCustomSizedTexture(x + 9, y + 36, 0, 0, (int) Degrees[0] , 2,(int) Degrees[0] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 63, 0, 0, (int) Degrees[1] , 2,(int) Degrees[1] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 90, 0, 0, (int) Degrees[2] , 2,(int) Degrees[2] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 117, 0, 0, (int) Degrees[3] , 2,(int) Degrees[3] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 144, 0, 0, (int) Degrees[4] , 2,(int) Degrees[4] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 171, 0, 0, (int) Degrees[5] , 2,(int) Degrees[5] , 2);
		drawModalRectWithCustomSizedTexture(x + 9, y + 198, 0, 0, (int) Degrees[6] , 2,(int) Degrees[6] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 36, 0, 0, (int) Degrees[7] , 2,(int) Degrees[7] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 63, 0, 0, (int) Degrees[8] , 2,(int) Degrees[8] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 90, 0, 0, (int) Degrees[9] , 2,(int) Degrees[9] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 117, 0, 0, (int) Degrees[10] , 2,(int) Degrees[10] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 144, 0, 0, (int) Degrees[11] , 2,(int) Degrees[11] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 171, 0, 0, (int) Degrees[12] , 2,(int) Degrees[12] , 2);
		drawModalRectWithCustomSizedTexture(x + 52, y + 198, 0, 0, (int) Degrees[13] , 2,(int) Degrees[13] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 36, 0, 0, (int) Degrees[14] , 2,(int) Degrees[14] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 63, 0, 0, (int) Degrees[15] , 2,(int) Degrees[15] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 90, 0, 0, (int) Degrees[16] , 2,(int) Degrees[16] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 117, 0, 0, (int) Degrees[17] , 2,(int) Degrees[17] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 144, 0, 0, (int) Degrees[18] , 2,(int) Degrees[18] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 171, 0, 0, (int) Degrees[19] , 2,(int) Degrees[19] , 2);
		drawModalRectWithCustomSizedTexture(x + 95, y + 198, 0, 0, (int) Degrees[20] , 2,(int) Degrees[20] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 36, 0, 0, (int) Degrees[21] , 2,(int) Degrees[21] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 63, 0, 0, (int) Degrees[22] , 2,(int) Degrees[22] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 90, 0, 0, (int) Degrees[23] , 2,(int) Degrees[23] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 117, 0, 0, (int) Degrees[24] , 2,(int) Degrees[24] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 144, 0, 0, (int) Degrees[25] , 2,(int) Degrees[25] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 171, 0, 0, (int) Degrees[26] , 2,(int) Degrees[26] , 2);
		drawModalRectWithCustomSizedTexture(x + 138, y + 198, 0, 0, (int) Degrees[27] , 2,(int) Degrees[27] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 36, 0, 0, (int) Degrees[28] , 2,(int) Degrees[28] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 63, 0, 0, (int) Degrees[29] , 2,(int) Degrees[29] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 90, 0, 0, (int) Degrees[30] , 2,(int) Degrees[30] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 117, 0, 0, (int) Degrees[31] , 2,(int) Degrees[31] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 144, 0, 0, (int) Degrees[32] , 2,(int) Degrees[32] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 171, 0, 0, (int) Degrees[33] , 2,(int) Degrees[33] , 2);
		drawModalRectWithCustomSizedTexture(x + 181, y + 198, 0, 0, (int) Degrees[34] , 2,(int) Degrees[34] , 2);

		ResourceLocation location4 = new ResourceLocation("mark13695", "textures/gui/skillLock.png");
		 this.mc.getTextureManager().bindTexture(location4);
		 if (XpLock1 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 17, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock2 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 44, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock3 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 71, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock4 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 98, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock5 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 125, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock6 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 152, 0, 0, 16, 16, 16, 16);
		 }
		 else{}
		 if (XpLock7 == 0){
		 drawModalRectWithCustomSizedTexture(x + 181, y + 179, 0, 0, 16, 16, 16, 16);
		 }
		 else{}


		 /** draws the levels */

		drawString (fontRendererObj , "" + Level[0] , x + 28, y + 21, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[1] , x + 28, y + 48, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[2] , x + 28, y + 75, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[3] , x + 28, y + 102, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[4] , x + 28, y + 129, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[5] , x + 28, y + 156, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[6] , x + 28, y + 183, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[7] , x + 71, y + 21, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[8] , x + 71, y + 48, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[9] , x + 71, y + 75, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[10] , x + 71, y + 102, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[11] , x + 71, y + 129, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[12] , x + 71, y + 156, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[13] , x + 71, y + 183, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[14] , x + 114, y + 21, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[15] , x + 114, y + 48, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[16] , x + 114, y + 75, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[17] , x + 114, y + 102, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[18] , x + 114, y + 129, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[19] , x + 114, y + 156, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[20] , x + 114, y + 183, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[21] , x + 157, y + 21, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[22] , x + 157, y + 48, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[23] , x + 157, y + 75, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[24] , x + 157, y + 102, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[25] , x + 157, y + 129, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[26] , x + 157, y + 156, 0x0000ff00);
		drawString (fontRendererObj , "" + Level[27] , x + 157, y + 183, 0x0000ff00);
		if (XpLock1 == 0){drawString (fontRendererObj , "" + Level[28] , x + 200, y + 21, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[28] , x + 200, y + 21, 0x0000ff00);}
		if (XpLock2 == 0){drawString (fontRendererObj , "" + Level[29] , x + 200, y + 48, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[29] , x + 200, y + 48, 0x0000ff00);}
		if (XpLock3 == 0){drawString (fontRendererObj , "" + Level[30] , x + 200, y + 75, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[30] , x + 200, y + 75, 0x0000ff00);}
		if (XpLock4 == 0){drawString (fontRendererObj , "" + Level[31] , x + 200, y + 102, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[31] , x + 200, y + 102, 0x0000ff00);}
		if (XpLock5 == 0){drawString (fontRendererObj , "" + Level[32] , x + 200, y + 129, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[32] , x + 200, y + 129, 0x0000ff00);}
		if (XpLock6 == 0){drawString (fontRendererObj , "" + Level[33] , x + 200, y + 156, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[33] , x + 200, y + 156, 0x0000ff00);}
		if (XpLock7 == 0){drawString (fontRendererObj , "" + Level[34] , x + 200, y + 183, 0x33333333);}
		else{
		drawString (fontRendererObj , "" + Level[34] , x + 200, y + 183, 0x0000ff00);}







		 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 17 && mouseY <= y + 33){
			 List listHp = new ArrayList();
			 listHp.add(Skill[0] +": " + Level[0]);
			 listHp.add("XP: " + XP[0]);
			 if(Level[0] == 99 && MainLock == 1 ) {}
			 else if(Level[0] == 200 && MainLock == 2) {}
			 else if(Level[0] == 255){}
			 else{
			 listHp.add("Next Level: " + NextLevel[0]);
			 listHp.add("XP Needed: " + XpNeed[0]);
			 }

			 this.drawHoveringText(listHp, x + 236, y + 16, fontRendererObj);
		 }


		 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 44 && mouseY <= y + 60) {
				 List listMl = new ArrayList();
				 listMl.add(Skill[1] +": " + Level[1]);
				 listMl.add("XP: " + XP[1]);
				 if(Level[1] == 99 && MainLock == 1 ) {}
				 else if(Level[1] == 200 && MainLock == 2) {}
				 else if(Level[1] == 255){}
				 else{
				 listMl.add("Next Level: " + NextLevel[1]);
				 listMl.add("XP Needed: " + XpNeed[1]);
				 }
				 this.drawHoveringText(listMl, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 71 && mouseY <= y + 87) {
				 List listRn = new ArrayList();
				 listRn.add(Skill[2] +": " + Level[2]);
				 listRn.add("XP: " + XP[2]);
				 if(Level[2] == 99 && MainLock == 1 ) {}
				 else if(Level[2] == 200 && MainLock == 2) {}
				 else if(Level[2] == 255){}
				 else{
				 listRn.add("Next Level: " + NextLevel[2]);
				 listRn.add("XP Needed: " + XpNeed[2]);
				 }
				 this.drawHoveringText(listRn, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 98 && mouseY <= y + 114) {
				 List listMg = new ArrayList();
				 listMg.add(Skill[3] +": " + Level[3]);
				 listMg.add("XP: " + XP[3]);
				 if(Level[3] == 99 && MainLock == 1 ) {}
				 else if(Level[3] == 200 && MainLock == 2) {}
				 else if(Level[3] == 255){}
				 else{
				 listMg.add("Next Level: " + NextLevel[3]);
				 listMg.add("XP Needed: " + XpNeed[3]);
				 }
				 this.drawHoveringText(listMg, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 125 && mouseY <= y + 141) {
				 List listDf = new ArrayList();
				 listDf.add(Skill[4] +": " + Level[4]);
				 listDf.add("XP: " + XP[4]);
				 if(Level[4] == 99 && MainLock == 1 ) {}
				 else if(Level[4] == 200 && MainLock == 2) {}
				 else if(Level[4] == 255){}
				 else{
				 listDf.add("Next Level: " + NextLevel[4]);
				 listDf.add("XP Needed: " + XpNeed[4]);
				 }
				 this.drawHoveringText(listDf, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 152 && mouseY <= y + 168) {
				 List listEn = new ArrayList();
				 listEn.add(Skill[5] +": " + Level[5]);
				 listEn.add("XP: " + XP[5]);
				 if(Level[5] == 99 && MainLock == 1 ) {}
				 else if(Level[5] == 200 && MainLock == 2) {}
				 else if(Level[5] == 255){}
				 else{
				 listEn.add("Next Level: " + NextLevel[5]);
				 listEn.add("XP Needed: " + XpNeed[5]);
				 }
				 this.drawHoveringText(listEn, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 9 && mouseX <= x + 47 && mouseY >= y + 179 && mouseY <= y + 195) {
				 List listSl = new ArrayList();
				 listSl.add(Skill[6] +": " + Level[6]);
				 listSl.add("XP: " + XP[6]);
				 if(Level[6] == 99 && MainLock == 1 ) {}
				 else if(Level[6] == 200 && MainLock == 2) {}
				 else if(Level[6] == 255){}
				 else{
				 listSl.add("Next Level: " + NextLevel[6]);
				 listSl.add("XP Needed: " + XpNeed[6]);
				 }
				 this.drawHoveringText(listSl, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 17 && mouseY <= y + 33) {
				 List listFr = new ArrayList();
				 listFr.add(Skill[7] +": " + Level[7]);
				 listFr.add("XP: " + XP[7]);
				 if(Level[7] == 99 && MainLock == 1 ) {}
				 else if(Level[7] == 200 && MainLock == 2) {}
				 else if(Level[7] == 255){}
				 else{
				 listFr.add("Next Level: " + NextLevel[7]);
				 listFr.add("XP Needed: " + XpNeed[7]);
				 }
				 this.drawHoveringText(listFr, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 44 && mouseY <= y + 60) {
				 List listMn = new ArrayList();
				 listMn.add(Skill[8] +": " + Level[8]);
				 listMn.add("XP: " + XP[8]);
				 if(Level[8] == 99 && MainLock == 1 ) {}
				 else if(Level[8] == 200 && MainLock == 2) {}
				 else if(Level[8] == 255){}
				 else{
				 listMn.add("Next Level: " + NextLevel[8]);
				 listMn.add("XP Needed: " + XpNeed[8]);
				 }
				 this.drawHoveringText(listMn, x + 236, y + 16, fontRendererObj);
			}






			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 71 && mouseY <= y + 87) {
				 List listHu = new ArrayList();
				 listHu.add(Skill[9]+ ": " + Level[9]);
				 listHu.add("XP: " + XP[9]);
				 if(Level[9] == 99 && MainLock == 1 ) {}
				 else if(Level[9] == 200 && MainLock == 2) {}
				 else if(Level[9] == 255){}
				 else{
				 listHu.add("Next Level: " + NextLevel[9]);
				 listHu.add("XP Needed: " + XpNeed[9]);
				 }
				 this.drawHoveringText(listHu, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 98 && mouseY <= y + 114) {
				 List listEx = new ArrayList();
				 listEx.add(Skill[10]+ ": " + Level[10]);
				 listEx.add("XP: " + XP[10]);
				 if(Level[10] == 99 && MainLock == 1 ) {}
				 else if(Level[10] == 200 && MainLock == 2) {}
				 else if(Level[10] == 255){}
				 else{
				 listEx.add("Next Level: " + NextLevel[10]);
				 listEx.add("XP Needed: " + XpNeed[10]);
				 }
				 this.drawHoveringText(listEx, x + 236, y + 16, fontRendererObj);
			}





			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 125 && mouseY <= y + 141) {
				 List listWc = new ArrayList();
				 listWc.add(Skill[11]+ ": " + Level[11]);
				 listWc.add("XP: " + XP[11]);
				 if(Level[11] == 99 && MainLock == 1 ) {}
				 else if(Level[11] == 200 && MainLock == 2) {}
				 else if(Level[11] == 255){}
				 else{
				 listWc.add("Next Level: " + NextLevel[11]);
				 listWc.add("XP Needed: " + XpNeed[11]);
				 }
				 this.drawHoveringText(listWc, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 152 && mouseY <= y + 168) {
				 List listFs = new ArrayList();
				 listFs.add(Skill[12]+ ": " + Level[12]);
				 listFs.add("XP: " + XP[12]);
				 if(Level[12] == 99 && MainLock == 1 ) {}
				 else if(Level[12] == 200 && MainLock == 2) {}
				 else if(Level[12] == 255){}
				 else{
				 listFs.add("Next Level: " + NextLevel[12]);
				 listFs.add("XP Needed: " + XpNeed[12]);
				 }
				 this.drawHoveringText(listFs, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 52 && mouseX <= x + 90 && mouseY >= y + 179 && mouseY <= y + 195) {
				 List listAr = new ArrayList();
				 listAr.add(Skill[13]+ ": " + Level[13]);
				 listAr.add("XP: " + XP[13]);
				 if(Level[13] == 99 && MainLock == 1 ) {}
				 else if(Level[13] == 200 && MainLock == 2) {}
				 else if(Level[13] == 255){}
				 else{
				 listAr.add("Next Level: " + NextLevel[13]);
				 listAr.add("XP Needed: " + XpNeed[13]);
				 }
				 this.drawHoveringText(listAr, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 17 && mouseY <= y + 33) {
				 List listTa = new ArrayList();
				 listTa.add(Skill[14] +": " + Level[14]);
				 listTa.add("XP: " + XP[14]);
				 if(Level[14] == 99 && MainLock == 1 ) {}
				 else if(Level[14] == 200 && MainLock == 2) {}
				 else if(Level[14] == 255){}
				 else{
				 listTa.add("Next Level: " + NextLevel[14]);
				 listTa.add("XP Needed: " + XpNeed[14]);
				 }
				 this.drawHoveringText(listTa, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 44 && mouseY <= y + 60) {
				 List listSm = new ArrayList();
				 listSm.add(Skill[15] +": " + Level[15]);
				 listSm.add("XP: " + XP[15]);
				 if(Level[15] == 99 && MainLock == 1 ) {}
				 else if(Level[15] == 200 && MainLock == 2) {}
				 else if(Level[15] == 255){}
				 else{
				 listSm.add("Next Level: " + NextLevel[15]);
				 listSm.add("XP Needed: " + XpNeed[15]);
				 }
				 this.drawHoveringText(listSm, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 71 && mouseY <= y + 87) {
				 List listTn = new ArrayList();
				 listTn.add(Skill[16]+ ": " + Level[16]);
				 listTn.add("XP: " + XP[16]);
				 if(Level[16] == 99 && MainLock == 1 ) {}
				 else if(Level[16] == 200 && MainLock == 2) {}
				 else if(Level[16] == 255){}
				 else{
				 listTn.add("Next Level: " + NextLevel[16]);
				 listTn.add("XP Needed: " + XpNeed[16]);
				 }
				 this.drawHoveringText(listTn, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 98 && mouseY <= y + 114) {
				 List listJe = new ArrayList();
				 listJe.add(Skill[17]+ ": " + Level[17]);
				 listJe.add("XP: " + XP[17]);
				 if(Level[17] == 99 && MainLock == 1 ) {}
				 else if(Level[17] == 200 && MainLock == 2) {}
				 else if(Level[17] == 255){}
				 else{
				 listJe.add("Next Level: " + NextLevel[17]);
				 listJe.add("XP Needed: " + XpNeed[17]);
				 }
				 this.drawHoveringText(listJe, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 125 && mouseY <= y + 141) {
				 List listWc = new ArrayList();
				 listWc.add(Skill[18]+ ": " + Level[18]);
				 listWc.add("XP: " + XP[18]);
				 if(Level[18] == 99 && MainLock == 1 ) {}
				 else if(Level[18] == 200 && MainLock == 2) {}
				 else if(Level[18] == 255){}
				 else{
				 listWc.add("Next Level: " + NextLevel[18]);
				 listWc.add("XP Needed: " + XpNeed[18]);
				 }
				 this.drawHoveringText(listWc, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 152 && mouseY <= y + 168) {
				 List listCo = new ArrayList();
				 listCo.add(Skill[19]+ ": " + Level[19]);
				 listCo.add("XP: " + XP[19]);
				 if(Level[19] == 99 && MainLock == 1 ) {}
				 else if(Level[19] == 200 && MainLock == 2) {}
				 else if(Level[19] == 255){}
				 else{
				 listCo.add("Next Level: " + NextLevel[19]);
				 listCo.add("XP Needed: " + XpNeed[19]);
				 }
				 this.drawHoveringText(listCo, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 95 && mouseX <= x + 133 && mouseY >= y + 179 && mouseY <= y + 195) {
				 List listHr = new ArrayList();
				 listHr.add(Skill[20]+ ": " + Level[20]);
				 listHr.add("XP: " + XP[20]);
				 if(Level[20] == 99 && MainLock == 1 ) {}
				 else if(Level[20] == 200 && MainLock == 2) {}
				 else if(Level[20] == 255){}
				 else{
				 listHr.add("Next Level: " + NextLevel[20]);
				 listHr.add("XP Needed: " + XpNeed[20]);
				 }
				 this.drawHoveringText(listHr, x + 236, y + 16, fontRendererObj);
			}




			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 17 && mouseY <= y + 33) {
				 List listHn = new ArrayList();
				 listHn.add(Skill[21] +": " + Level[21]);
				 listHn.add("XP: " + XP[21]);
				 if(Level[21] == 99 && MainLock == 1 ) {}
				 else if(Level[21] == 200 && MainLock == 2) {}
				 else if(Level[21] == 255){}
				 else{
				 listHn.add("Next Level: " + NextLevel[21]);
				 listHn.add("XP Needed: " + XpNeed[21]);
				 }
				 this.drawHoveringText(listHn, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 44 && mouseY <= y + 60) {
				 List listSm = new ArrayList();
				 listSm.add(Skill[22] +": " + Level[22]);
				 listSm.add("XP: " + XP[22]);
				 if(Level[22] == 99 && MainLock == 1 ) {}
				 else if(Level[22] == 200 && MainLock == 2) {}
				 else if(Level[22] == 255){}
				 else{
				 listSm.add("Next Level: " + NextLevel[22]);
				 listSm.add("XP Needed: " + XpNeed[22]);
				 }
				 this.drawHoveringText(listSm, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 71 && mouseY <= y + 87) {
				 List listAg = new ArrayList();
				 listAg.add(Skill[23]+ ": " + Level[23]);
				 listAg.add("XP: " + XP[23]);
				 if(Level[23] == 99 && MainLock == 1 ) {}
				 else if(Level[23] == 200 && MainLock == 2) {}
				 else if(Level[23] == 255){}
				 else{
				 listAg.add("Next Level: " + NextLevel[23]);
				 listAg.add("XP Needed: " + XpNeed[23]);
				 }
				 this.drawHoveringText(listAg, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 98 && mouseY <= y + 114) {
				 List listDu = new ArrayList();
				 listDu.add(Skill[24]+ ": " + Level[24]);
				 listDu.add("XP: " + XP[24]);
				 if(Level[24] == 99 && MainLock == 1 ) {}
				 else if(Level[24] == 200 && MainLock == 2) {}
				 else if(Level[24] == 255){}
				 else{
				 listDu.add("Next Level: " + NextLevel[24]);
				 listDu.add("XP Needed: " + XpNeed[24]);
				 }
				 this.drawHoveringText(listDu, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 125 && mouseY <= y + 141) {
				 List listFm = new ArrayList();
				 listFm.add(Skill[25]+ ": " + Level[25]);
				 listFm.add("XP: " + XP[25]);
				 if(Level[25] == 99 && MainLock == 1 ) {}
				 else if(Level[25] == 200 && MainLock == 2) {}
				 else if(Level[25] == 255){}
				 else{
				 listFm.add("Next Level: " + NextLevel[25]);
				 listFm.add("XP Needed: " + XpNeed[25]);
				 }
				 this.drawHoveringText(listFm, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 152 && mouseY <= y + 168) {
				 List listLs = new ArrayList();
				 listLs.add(Skill[26]+ ": " + Level[26]);
				 listLs.add("XP: " + XP[26]);
				 if(Level[26] == 99 && MainLock == 1 ) {}
				 else if(Level[26] == 200 && MainLock == 2) {}
				 else if(Level[26] == 255){}
				 else{
				 listLs.add("Next Level: " + NextLevel[26]);
				 listLs.add("XP Needed: " + XpNeed[26]);
				 }
				 this.drawHoveringText(listLs, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 138 && mouseX <= x + 176 && mouseY >= y + 179 && mouseY <= y + 195) {
				 List listKn = new ArrayList();
				 listKn.add(Skill[27]+ ": " + Level[27]);
				 listKn.add("XP: " + XP[27]);
				 if(Level[27] == 99 && MainLock == 1 ) {}
				 else if(Level[27] == 200 && MainLock == 2) {}
				 else if(Level[27] == 255){}
				 else{
				 listKn.add("Next Level: " + NextLevel[27]);
				 listKn.add("XP Needed: " + XpNeed[27]);
				 }
				 this.drawHoveringText(listKn, x + 236, y + 16, fontRendererObj);
			}



			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 17 && mouseY <= y + 33) {
				 List listTc = new ArrayList();
				 if (XpLock1 == 0){
				 listTc.add("Locked");}
				 else{
				 listTc.add(Skill[28] +": " + Level[28]);
				 listTc.add("XP: " + XP[28]);
				 if(Level[21] == 99 && MainLock == 1 ) {}
				 else if(Level[28] == 200 && MainLock == 2) {}
				 else if(Level[28] == 255){}
				 else{
				 listTc.add("Next Level: " + NextLevel[28]);
				 listTc.add("XP Needed: " + XpNeed[28]);
				 }}
				 this.drawHoveringText(listTc, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 44 && mouseY <= y + 60) {
				 List listPe = new ArrayList();
				 if (XpLock2 == 0){
					 listPe.add("Locked");}
					 else{
				 listPe.add(Skill[29] +": " + Level[29]);
				 listPe.add("XP: " + XP[22]);
				 if(Level[29] == 99 && MainLock == 1 ) {}
				 else if(Level[29] == 200 && MainLock == 2) {}
				 else if(Level[29] == 255){}
				 else{
				 listPe.add("Next Level: " + NextLevel[29]);
				 listPe.add("XP Needed: " + XpNeed[29]);
				 }}
				 this.drawHoveringText(listPe, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 71 && mouseY <= y + 87) {
				 List listCh = new ArrayList();
				 if (XpLock3 == 0){
					 listCh.add("Locked");}
					 else{
				 listCh.add(Skill[30]+ ": " + Level[30]);
				 listCh.add("XP: " + XP[30]);
				 if(Level[30] == 99 && MainLock == 1 ) {}
				 else if(Level[30] == 200 && MainLock == 2) {}
				 else if(Level[30] == 255){}
				 else{
				 listCh.add("Next Level: " + NextLevel[30]);
				 listCh.add("XP Needed: " + XpNeed[30]);
				 }}
				 this.drawHoveringText(listCh, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 98 && mouseY <= y + 114) {
				 List listSp = new ArrayList();
				 if (XpLock4 == 0){
					 listSp.add("Locked");}
					 else{
				 listSp.add(Skill[31]+ ": " + Level[31]);
				 listSp.add("XP: " + XP[24]);
				 if(Level[31] == 99 && MainLock == 1 ) {}
				 else if(Level[31] == 200 && MainLock == 2) {}
				 else if(Level[31] == 255){}
				 else{
				 listSp.add("Next Level: " + NextLevel[31]);
				 listSp.add("XP Needed: " + XpNeed[31]);
				 }}
				 this.drawHoveringText(listSp, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 125 && mouseY <= y + 141) {
				 List listMu = new ArrayList();
				 if (XpLock5 == 0){
					 listMu.add("Locked");}
					 else{
				 listMu.add(Skill[32]+ ": " + Level[32]);
				 listMu.add("XP: " + XP[32]);
				 if(Level[32] == 99 && MainLock == 1 ) {}
				 else if(Level[32] == 200 && MainLock == 2) {}
				 else if(Level[32] == 255){}
				 else{
				 listMu.add("Next Level: " + NextLevel[32]);
				 listMu.add("XP Needed: " + XpNeed[32]);
				 }}
				 this.drawHoveringText(listMu, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 152 && mouseY <= y + 168) {
				 List listFi = new ArrayList();
				 if (XpLock6 == 0){
					 listFi.add("Locked");}
					 else{
				 listFi.add(Skill[33]+ ": " + Level[33]);
				 listFi.add("XP: " + XP[33]);
				 if(Level[33] == 99 && MainLock == 1 ) {}
				 else if(Level[33] == 200 && MainLock == 2) {}
				 else if(Level[33] == 255){}
				 else{
				 listFi.add("Next Level: " + NextLevel[33]);
				 listFi.add("XP Needed: " + XpNeed[33]);
				 }}
				 this.drawHoveringText(listFi, x + 236, y + 16, fontRendererObj);

			 }


			 if(mouseX >= x + 181 && mouseX <= x + 219 && mouseY >= y + 179 && mouseY <= y + 195) {
				 List listFu = new ArrayList();
				 if (XpLock7 == 0){
					 listFu.add("Locked");}
					 else{
				 listFu.add(Skill[34]+ ": " + Level[34]);
				 listFu.add("XP: " + XP[34]);
				 if(Level[34] == 99 && MainLock == 1 ) {}
				 else if(Level[34] == 200 && MainLock == 2) {}
				 else if(Level[34] == 255){}
				 else{
				 listFu.add("Next Level: " + NextLevel[34]);
				 listFu.add("XP Needed: " + XpNeed[34]);
				 }}
				 this.drawHoveringText(listFu, x + 236, y + 16, fontRendererObj);

			 }





		 }














 @Override
 public boolean doesGuiPauseGame() {
 return false;
                      
     }

 @Override
    public void initGui() {



 }






 @Override
     public void updateScreen() {
         super.updateScreen();
 }
}

 

 

Thanks for the help, :)

 

Mark136

my Mod: Extended RPG [W.I.P]

Posted

0) do not use getBlockById.  Just because the block ID is what you have in your code in your development environtment does not mean that that is what it will be when someone else loads your mod.  Just compare blocks. 

if(block == Blocks.stone)

 

1) don't cancel the block break event, you want to interrupt the EventPlayerBreakSpeed (If I am remembering its name correctly).

 

2) GuiStatlist is a client-side class, you can't just directly add xp to the gui.  That will crash the server.  You need a Capabilities object that will save the player's skills and exp so that it can be both network-safe and persistent.

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.

Posted

Note that event handlers are not usually implemented as static methods, at least in my experience. I don't know if that will break anything, but there is no reason to make the method static, and certainly do NOT use static ID - what the heck is that for? The BreakEvent GIVES you the block that was broken - use it.

 

I'd also recommend making a lookup table for your xp charts, especially if you are going to include more block types or want a way for other mods to add their own blocks via some kind of API.

 

As a brief and incomplete example:

private static final HashMap<Block, Integer> xpChart = new HashMap<Block, Integer>();

public void setBlockXp(Block block, int xp) {
    xpChart.put(block, xp);
}

// then in your break event:
@SubscribeEvent
public void onBreak(BreakEvent event) {
   Integer xp = xpChart.get(event.block); // note that this may return NULL
   // etc.
}

Posted

ok i saw that i need 2 events, one for getting Xp if the block breaks and one for interrupting the breakspeed.

But i cant find a method that looks up for me what block i'm exactly mining.

 

*if(Block == Block.stone)* does'nt work for me

(event.block) gives error "block cannot be resolved or is not a field"

 

i also replaced my level and Xp and Calcs to an other classfile :P

i'm sorry for my bad java. im still need to learn a lot more of it. at least i can read it well  but can make some ugly mistakes if i write the code myself.

my Mod: Extended RPG [W.I.P]

Posted

why so Mad, Relax Man, everyone needs to start sometime with java. i already written my Gui myself, and then I come with some problems with finding the right field, but you say I could find that code by looking in the source. okay yeah a very stupit question but where can i find that source code? because i can't find that files man... if i find a method/field that i can use i mostly google it 20 times for what it exactly can do ect.

PS. oh nvm i found them... how can i be so stupid

 

my Mod: Extended RPG [W.I.P]

Posted

Right click, references, find in workspace.

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.

Posted

(which is also Ctrl-Shift-G, long live the keyboard).

 

I don't use it often enough to remember the keyboard shortcut.

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.

Posted

okay, it's working. maybe not the shortest way but it works. only problem now is that i want to let everyone on my server got his own skill levels and XP.

package com.modMark.Skill;

import com.modMark.Item_Block.MarkBlocks;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {

public static Block ID;
public static int[] getXP = new int[35];
public static boolean notnull;
public static int ReqLvl;
public static EntityPlayer player;



@SubscribeEvent
public void Breakevent1(BreakSpeed event)
{
	//...
	EntityPlayer Player = player;


	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		ReqLvl = 0;
		}


	if (block == Blocks.wheat){
		ReqLvl = 0;
		}
	if (block == Blocks.carrots){
		ReqLvl = 5;
		}
	if (block == Blocks.potatoes){
		ReqLvl = 10;
		}



	if (block == Blocks.coal_ore){
		ReqLvl = 5;
		}
	if (block == Blocks.emerald_ore){
		ReqLvl = 10;
		}
	if (block == Blocks.iron_ore){
		ReqLvl = 20;
		}
	if (block == Blocks.lapis_ore){
		ReqLvl = 25;
		}
	if (block == Blocks.gold_ore){
		ReqLvl = 30;
		}
	if (block == Blocks.diamond_ore){
		ReqLvl = 40;
		}
	if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		ReqLvl = 45;
		}
	if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		ReqLvl = 50;
		}
	if (block == MarkBlocks.OreNetherite){
		ReqLvl = 60;
		}
	if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		ReqLvl = 70;
		}
	if (block == MarkBlocks.NetherStone){
		ReqLvl = 75;
		}
	if (block == MarkBlocks.OreOther){
		ReqLvl = 80;
		}




	if (block == Blocks.dirt || block == Blocks.grass){
		ReqLvl = 0;
		}
	if (block == MarkBlocks.GemOpalOre){
		ReqLvl = 5;
		}
	if (block == Blocks.gravel){
		ReqLvl = 5;
		}
	if (block == MarkBlocks.GemSapphireOre){
		ReqLvl = 10;
		}
	if (block == Blocks.sand){
		ReqLvl = 10;
		}
	if (block == MarkBlocks.GemOlivineOre){
		ReqLvl = 15;
		}
	if (block == MarkBlocks.GemHyacinthOre){
		ReqLvl = 20;
		}
	if (block == MarkBlocks.GemTopazOre){
		ReqLvl = 25;
		}
	if (block == Blocks.mycelium){
		ReqLvl = 30;
		}
	if (block == MarkBlocks.GemAmethystOre){
		ReqLvl = 40;
		}
	if (block == Blocks.soul_sand){
		ReqLvl = 50;
		}
	if (block == MarkBlocks.GemSiamOre){
		ReqLvl = 60;
		}
	if (block == MarkBlocks.CrystSand){
		ReqLvl = 75;
		}
	if (block == MarkBlocks.GemAquamarineOre){
		ReqLvl = 80;
		}


	if (block == Blocks.log){
		ReqLvl = 0;
		}
	if (block == Blocks.cactus){
		ReqLvl = 10;
		}
	if (block == Blocks.log2){
		ReqLvl = 20;
		}
	if (block == MarkBlocks.LogYew){
		ReqLvl = 40;
		}
	if (block == MarkBlocks.LogNetherBranch){
		ReqLvl = 60;
		}
	if (block == MarkBlocks.LogNetherWood){
		ReqLvl = 80;
		}


if (ReqLvl > Skill.Level[8] && block.getMaterial() == Material.rock){
	event.setCanceled(true);
	FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText("You need " + ReqLvl + " Mining for this."));
	}
else if
	(ReqLvl > Skill.Level[10] && block.getMaterial() == Material.sand || ReqLvl > Skill.Level[10] && block.getMaterial() == Material.ground){
	event.setCanceled(true);
	FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText("You need " + ReqLvl + " Excavation for this."));
}
else if
	(ReqLvl > Skill.Level[7] && block.getMaterial() == Material.plants){
	event.setCanceled(true);
	FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText("You need " + ReqLvl + " Farming for this."));
}
else if
(ReqLvl > Skill.Level[11] && block.getMaterial() == Material.wood || ReqLvl > Skill.Level[11] && block.getMaterial() == Material.cactus){
event.setCanceled(true);
FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText("You need " + ReqLvl + " Woodcutting for this."));
}
else if (block.getMaterial() == Material.air){

}
else{}






	}



@SubscribeEvent
public void BreakBlock(BreakEvent event){

	Block block = event.state.getBlock();
	ID = event.state.getBlock();
	if (block != null || block != Blocks.air){
		this.notnull = true;
	}
	else{ this.notnull = false; }
	if (block == Blocks.stone || block == Blocks.cobblestone){	
		getXP[8] += 8;
		}
	//farming
	else if (block == Blocks.wheat){
		getXP[7] += 5;
		}
	else if (block == Blocks.carrots){
		getXP[7] += 7;
		}
	else if (block == Blocks.potatoes){
		getXP[7] += 9;
		}



	//mining
	else if (block == Blocks.coal_ore){
		getXP[8] += 12;
		}
	else if (block == Blocks.emerald_ore){
		getXP[8] += 16;
		}
	else if (block == Blocks.iron_ore){
		getXP[8] += 20;
		}
	else if (block == Blocks.lapis_ore){
		getXP[8] += 24;
		}
	else if (block == Blocks.gold_ore){
		getXP[8] += 28;
		}
	else if (block == Blocks.diamond_ore){
		getXP[8] += 32;
		}
	else if (block == Blocks.redstone_ore){
		getXP[8] += 33;
		}
	else if (block == Blocks.obsidian){
		getXP[8] += 34;
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		getXP[8] += 35;
		}
	else if (block == MarkBlocks.OreNetherite){
		getXP[10] += 40;
		}
	else if (block == Blocks.quartz_ore){
		getXP[8] += 42;
		}
	else if (block == MarkBlocks.NetherStone){
		getXP[8] += 45;
		}
	else if (block == MarkBlocks.OreOther){
		getXP[8] += 50;
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		getXP[10] += 5;
		}
	else if (block == MarkBlocks.GemOpalOre){
		getXP[10] += 8;
		}
	else if (block == Blocks.gravel){
		getXP[10] += 7;
		}
	else if (block == MarkBlocks.GemSapphireOre){
		getXP[10] += 12;
		}
	else if (block == Blocks.sand){
		getXP[10] += 9;
		}
	else if (block == MarkBlocks.GemOlivineOre){
		getXP[10] += 16;
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		getXP[10] += 20;
		}
	else if (block == MarkBlocks.GemTopazOre){
		getXP[10] += 24;
		}
	else if (block == Blocks.mycelium){
		getXP[10] += 28;
		}
	else if (block == MarkBlocks.GemAmethystOre){
		getXP[10] += 32;
		}
	else if (block == Blocks.soul_sand){
		getXP[10] += 35;
		}
	else if (block == MarkBlocks.GemSiamOre){
		getXP[10] += 40;
		}
	else if (block == MarkBlocks.OtherSand){
		getXP[10] += 45;
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		getXP[10] += 50;
		}


	else if (block == Blocks.log){
		getXP[11] += 10;
		}
	else if (block == Blocks.cactus){
		getXP[11] += 12;
		}
	else if (block == Blocks.log2){
		getXP[11] += 18;
		}
	else if (block == MarkBlocks.LogYew){
		getXP[11] += 30;
		}
	else if (block == MarkBlocks.LogNetherBranch){
		getXP[11] += 45;
		}
	else if (block == MarkBlocks.LogNetherWood){
		getXP[11] += 60;
		}

	else {

		}

	if (notnull == true){
		getEventXp();
	}






}
	public static void getEventXp() {

		for (int i = 0;i < 35; i++){
			if (getXP[i] > 500000 && Skill.MainLock == 1){
				getXP[i] = 500000;
			}
			else if (getXP[i] > 85000000 && Skill.MainLock == 2){
				getXP[i] = 85000000;
			}
			else if (getXP[i] > 2000000000 && Skill.MainLock == 3){
				getXP[i] = 2000000000;
			}

		}

		Skill.getXp(Skill.Player);
			for(int j = 0; j < 35; j++){
		Skill.XP[j] += getXP[j];
			}
		}
		}

 

oh and also, i'm creating some extra stuff like blocks and items and trees. (that new model system for textures is a bit differend than i remembered previous)and that works fine :)

my Mod: Extended RPG [W.I.P]

Posted

yeah, have worked on it. but got a real fight right now with the packetHandler (IMessage/IMessageHandler)

 

i put my files here again

here's My EventHandler

EventHandlerMark.java:

 

package com.modMark.Skill;

import java.util.List;

import com.modMark.Item_Block.MarkBlocks;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {

public boolean notnull;





@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
	if (event.entity instanceof EntityPlayer && XpSave.get((EntityPlayer) event.entity) == null){	
		XpSave.register((EntityPlayer) event.entity);

		EntityPlayer player = (EntityPlayer) event.entity;
		XpSave p = XpSave.get(player);

		for (int i = 0; i < 35; i++){
			p.XP[i] = 0;

		}

	}


}

@SubscribeEvent
public void Farming(SaplingGrowTreeEvent event)
{


}




@SubscribeEvent
public void MinExcaWCFarm_Req(BreakSpeed event)
{
	//Event for req level Mining, Excavation, Woodcutting & Farming
	EntityPlayer player = event.entityPlayer;
	XpSave p = XpSave.get(player);

	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		p.requireLvl(8, 0);
		}


	if (block == Blocks.wheat){
		p.requireLvl(7, 0);
		}
	if (block == Blocks.carrots){
		p.requireLvl(7, 5);
		}
	if (block == Blocks.potatoes){
		p.requireLvl(7, 10);
		}



	if (block == Blocks.coal_ore){
		p.requireLvl(8, 5);
		}
	if (block == Blocks.emerald_ore){
		p.requireLvl(8, 10);
		}
	if (block == Blocks.iron_ore){
		p.requireLvl(8, 20);
		}
	if (block == Blocks.lapis_ore){
		p.requireLvl(8, 25);
		}
	if (block == Blocks.gold_ore){
		p.requireLvl(8, 30);
		}
	if (block == Blocks.diamond_ore){
		p.requireLvl(8, 40);
		}
	if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		p.requireLvl(8, 45);
		}
	if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		p.requireLvl(8, 50);
		}
	if (block == MarkBlocks.OreNetherite){
		p.requireLvl(8, 60);
		}
	if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		p.requireLvl(8, 70);
		}
	if (block == MarkBlocks.CrystRack){
		p.requireLvl(8, 75);
		}
	if (block == MarkBlocks.OreCrystlium){
		p.requireLvl(8, 80);
		}



	//excavation
	if (block == Blocks.dirt || block == Blocks.grass){
		p.requireLvl(10, 0);
		}
	if (block == MarkBlocks.GemOpalOre){
		p.requireLvl(10, 5);
		}
	if (block == Blocks.gravel){
		p.requireLvl(10, 5);
		}
	if (block == MarkBlocks.GemSapphireOre){
		p.requireLvl(10, 10);
		}
	if (block == Blocks.sand){
		p.requireLvl(10, 10);
		}
	if (block == MarkBlocks.GemOlivineOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemHyacinthOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemTopazOre){
		p.requireLvl(10, 25);;
		}
	if (block == Blocks.mycelium){
		p.requireLvl(10, 30);
		}
	if (block == MarkBlocks.GemAmethystOre){
		p.requireLvl(10, 40);
		}
	if (block == Blocks.soul_sand){
		p.requireLvl(10, 50);
		}
	if (block == MarkBlocks.GemSiamOre){
		p.requireLvl(10, 60);
		}
	if (block == MarkBlocks.CrystSand){
		p.requireLvl(10, 75);
		}
	if (block == MarkBlocks.GemAquamarineOre){
		p.requireLvl(10, 80);
		}


	if (block == Blocks.log){
		p.requireLvl(11, 0);
		}
	if (block == Blocks.cactus){
		p.requireLvl(11, 10);
		}
	if (block == Blocks.log2){
		p.requireLvl(11, 20);
		}
	if (block == MarkBlocks.LogYew){
		p.requireLvl(11, 40);
		}
	if (block == MarkBlocks.LogNetherBranch){
		p.requireLvl(11, 60);
		}
	if (block == MarkBlocks.LogCrystWood){
		p.requireLvl(11, 80);
		}

	if (XpSave.candothis == false){
	event.setCanceled(true);
	}	
}



@SubscribeEvent
public void MinExcaWC_XP(BreakEvent event){

	EntityPlayer player = event.getPlayer();

	XpSave p = XpSave.get(player);
	Block block = event.state.getBlock();
	if (block != null || block != Blocks.air){
		this.notnull = true;
	}
	else{ this.notnull = false; }
	if (block == Blocks.stone || block == Blocks.cobblestone){	
		p.getXp(8, ;
		}



	if (block == Blocks.wheat && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 5);
	}
	else if (block == Blocks.carrots && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 7);
	}
	else if (block == Blocks.potatoes && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 9);
	}

	//mining
	else if (block == Blocks.coal_ore){
		p.getXp(8, 12);
		}
	else if (block == Blocks.emerald_ore){
		p.getXp(8, 16);
		}
	else if (block == Blocks.iron_ore){
		p.getXp(8, 20);
		}
	else if (block == Blocks.lapis_ore){
		p.getXp(8, 24);
		}
	else if (block == Blocks.gold_ore){
		p.getXp(8, 28);
		}
	else if (block == Blocks.diamond_ore){
		p.getXp(8, 32);
		}
	else if (block == Blocks.redstone_ore){
		p.getXp(8, 33);
		}
	else if (block == Blocks.obsidian){
		p.getXp(8, 34);
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		p.getXp(8, 35);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.getXp(8, 40);
		}
	else if (block == Blocks.quartz_ore){
		p.getXp(8, 42);
		}
	else if (block == MarkBlocks.CrystRack){
		p.getXp(8, 45);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.getXp(8, 50);
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		p.getXp(10, 5);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.getXp(10, ;
		}
	else if (block == Blocks.gravel){
		p.getXp(10, 7);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.getXp(10, 12);
		}
	else if (block == Blocks.sand){
		p.getXp(10, 9);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.getXp(10, 16);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.getXp(10, 20);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.getXp(10, 24);
		}
	else if (block == Blocks.mycelium){
		p.getXp(10, 28);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.getXp(10, 32);
		}
	else if (block == Blocks.soul_sand){
		p.getXp(10, 35);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.getXp(10, 40);
		}
	else if (block == MarkBlocks.CrystSand){
		p.getXp(10, 45);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.getXp(10, 50);
		}


	else if (block == Blocks.log){
		p.getXp(11, 10);
		}
	else if (block == Blocks.cactus){
		p.getXp(11, 12);
		}
	else if (block == Blocks.log2){
		p.getXp(11, 18);
		}
	else if (block == MarkBlocks.LogYew){
		p.getXp(11, 30);

		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.getXp(11, 45);

		}
	else if (block == MarkBlocks.LogCrystWood){
		p.getXp(11, 60);
		}

	else {

		}

	if (notnull == true){
		p.getEventXp();
	}
}
}

 

I will come with the XpSave File(IExtendedEntityProperties) as soon as possible

same for the IMessageHandler and IMessage File

 

 

my Mod: Extended RPG [W.I.P]

Posted

hhm, I got an error... something with The Sending of my Packet from server to client. the game does'nt crash, but i don't get XP

but got an error in the console:

 

ps. this is much more work than i expected, all i want to do is to give every player the stats. so i need IExtendedEntityProperties for it. also, i need to send this to the client side to put it into the gui. because i got 35 skills  with xp variables that changes much i also need a datawatcher. ehh ok i'm lost right know...

 

here are the files

IExtendedEntityProperties file

package com.modMark.Skill;

import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;

public class XpSave implements IExtendedEntityProperties {

public static final String EXT_PLAYER136 = "ExtendedPlayer";
private final EntityPlayer player;
public static boolean candothis;
public static int[] XP = new int[35];

public XpSave(EntityPlayer player){
	this.player = player;
	getEventXp();

}
public static final void register(EntityPlayer player)
{
player.registerExtendedProperties(XpSave.EXT_PLAYER136, new XpSave(player));
}

public static final XpSave get(EntityPlayer player)
{
	return (XpSave) player.getExtendedProperties(EXT_PLAYER136);
}

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = new NBTTagCompound();
	for(int i = 0;i < 35; i++){
	properties.setInteger("Skill[" + i + "]", XP[i]);

	}
}

@Override
public void loadNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PLAYER136);
	for (int i = 0; i < 35; i++)
		XP[i] = properties.getInteger("Skill[" + i + "]");

}

@Override
public void init(Entity entity, World world) {

}

public int getXp(int SkillID, int amount){

	return XP[skillID] += amount;

}

public void requireLvl(int SkillID, int reqlvl){
	Skill.getSkillName();
	candothis = Skill.Level[skillID] >= reqlvl;
	if(candothis == false){
		ChatComponentText component = new ChatComponentText("You need " + reqlvl + " " + Skill.SkillName[skillID] + " for this");
		player.addChatComponentMessage(component);
	}


}

public static void getEventXp() {

for (int i = 0;i < 35; i++){
	if ((XP[i]) > 500000 && Skill.MainLock == 1){
		XP[i] = 500000;

	}
	else if ((XP[i]) > 85000000 && Skill.MainLock == 2){

		XP[i] = 85000000;
	}
	else if ((XP[i]) > 2000000000 && Skill.MainLock == 3){

		XP[i] = 2000000000;
	}
}
}
}

 

IMessage file

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.Skill;
import com.modMark.Skill.XpSave;

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

public class SkillPacket implements IMessage{

public SkillPacket() {}
public SkillPacket(int s){
	XpSave.getEventXp();

	EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().thePlayer;
	XpSave p = XpSave.get(player);
	for (int i = 0; i < 35; i++){
	p.XP[i] = s[i];
	}
}

@Override
public void fromBytes(ByteBuf buf) {
	for (int j = 0; j < 35; j++){
	buf.writeInt(XpSave.XP[j]);
	}
}

@Override
public void toBytes(ByteBuf buf) {
	for (int k = 0; k < 35; k++){
	XpSave.XP[k] = buf.readInt();
	}
}

}

IMessageHandler File

package com.modMark.Packets;



import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.XpSave;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.IThreadListener;
import net.minecraft.world.WorldServer;
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;

public class MarkPacketHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {
			EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().thePlayer;
					XpSave p = XpSave.get(player);
					XpSave.getEventXp();
                    for (int i = 0; i < 35; i++){
                    	p.XP[i] = GuiStatlist.XP[i];
                    }
                }
			});
	return null;
}

}

 

and again my EventHandler File

package com.modMark.Skill;

import java.util.List;

import com.modMark.Item_Block.MarkBlocks;
import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {

public static boolean notnull;





@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
	if (event.entity instanceof EntityPlayer && XpSave.get((EntityPlayer) event.entity) == null){	
		XpSave.register((EntityPlayer) event.entity);

		EntityPlayer player = (EntityPlayer) event.entity;
		XpSave p = XpSave.get(player);

		for (int i = 0; i < 35; i++){
			p.XP[i] = 0;

		}
	}


}

@SubscribeEvent
public void Farming(SaplingGrowTreeEvent event)
{


}




@SubscribeEvent
public void MinExcaWCFarm_Req(BreakSpeed event)
{
	//Event for req level Mining, Excavation, Woodcutting & Farming
	EntityPlayer player = event.entityPlayer;
	XpSave p = XpSave.get(player);

	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		p.requireLvl(8, 0);
		}


	if (block == Blocks.wheat){
		p.requireLvl(7, 0);
		}
	if (block == Blocks.carrots){
		p.requireLvl(7, 5);
		}
	if (block == Blocks.potatoes){
		p.requireLvl(7, 10);
		}



	if (block == Blocks.coal_ore){
		p.requireLvl(8, 5);
		}
	if (block == Blocks.emerald_ore){
		p.requireLvl(8, 10);
		}
	if (block == Blocks.iron_ore){
		p.requireLvl(8, 20);
		}
	if (block == Blocks.lapis_ore){
		p.requireLvl(8, 25);
		}
	if (block == Blocks.gold_ore){
		p.requireLvl(8, 30);
		}
	if (block == Blocks.diamond_ore){
		p.requireLvl(8, 40);
		}
	if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		p.requireLvl(8, 45);
		}
	if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		p.requireLvl(8, 50);
		}
	if (block == MarkBlocks.OreNetherite){
		p.requireLvl(8, 60);
		}
	if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		p.requireLvl(8, 70);
		}
	if (block == MarkBlocks.CrystRack){
		p.requireLvl(8, 75);
		}
	if (block == MarkBlocks.OreCrystlium){
		p.requireLvl(8, 80);
		}



	//excavation
	if (block == Blocks.dirt || block == Blocks.grass){
		p.requireLvl(10, 0);
		}
	if (block == MarkBlocks.GemOpalOre){
		p.requireLvl(10, 5);
		}
	if (block == Blocks.gravel){
		p.requireLvl(10, 5);
		}
	if (block == MarkBlocks.GemSapphireOre){
		p.requireLvl(10, 10);
		}
	if (block == Blocks.sand){
		p.requireLvl(10, 10);
		}
	if (block == MarkBlocks.GemOlivineOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemHyacinthOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemTopazOre){
		p.requireLvl(10, 25);;
		}
	if (block == Blocks.mycelium){
		p.requireLvl(10, 30);
		}
	if (block == MarkBlocks.GemAmethystOre){
		p.requireLvl(10, 40);
		}
	if (block == Blocks.soul_sand){
		p.requireLvl(10, 50);
		}
	if (block == MarkBlocks.GemSiamOre){
		p.requireLvl(10, 60);
		}
	if (block == MarkBlocks.CrystSand){
		p.requireLvl(10, 75);
		}
	if (block == MarkBlocks.GemAquamarineOre){
		p.requireLvl(10, 80);
		}


	if (block == Blocks.log){
		p.requireLvl(11, 0);
		}
	if (block == Blocks.cactus){
		p.requireLvl(11, 10);
		}
	if (block == Blocks.log2){
		p.requireLvl(11, 20);
		}
	if (block == MarkBlocks.LogYew){
		p.requireLvl(11, 40);
		}
	if (block == MarkBlocks.LogNetherBranch){
		p.requireLvl(11, 60);
		}
	if (block == MarkBlocks.LogCrystWood){
		p.requireLvl(11, 80);
		}

	if (XpSave.candothis == false){
	event.setCanceled(true);
	}	
}



@SubscribeEvent
public void MinExcaWC_XP(BreakEvent event){

	EntityPlayer player = event.getPlayer();
	XpSave p = XpSave.get(player);
	Block block = event.state.getBlock();


	if (block != null || block != Blocks.air){
		this.notnull = true;
	}
	else{ this.notnull = false; }
	if (block == Blocks.stone || block == Blocks.cobblestone){	
		p.getXp(8, ;
		}



	else if (block == Blocks.wheat && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 5);
	}
	else if (block == Blocks.carrots && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 7);
	}
	else if (block == Blocks.potatoes && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.getXp(7, 9);
	}

	//mining
	else if (block == Blocks.coal_ore){
		p.getXp(8, 12);
		}
	else if (block == Blocks.emerald_ore){
		p.getXp(8, 16);
		}
	else if (block == Blocks.iron_ore){
		p.getXp(8, 20);
		}
	else if (block == Blocks.lapis_ore){
		p.getXp(8, 24);
		}
	else if (block == Blocks.gold_ore){
		p.getXp(8, 28);
		}
	else if (block == Blocks.diamond_ore){
		p.getXp(8, 32);
		}
	else if (block == Blocks.redstone_ore){
		p.getXp(8, 33);
		}
	else if (block == Blocks.obsidian){
		p.getXp(8, 34);
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		p.getXp(8, 35);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.getXp(8, 40);
		}
	else if (block == Blocks.quartz_ore){
		p.getXp(8, 42);
		}
	else if (block == MarkBlocks.CrystRack){
		p.getXp(8, 45);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.getXp(8, 50);
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		p.getXp(10, 5);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.getXp(10, ;
		}
	else if (block == Blocks.gravel){
		p.getXp(10, 7);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.getXp(10, 12);
		}
	else if (block == Blocks.sand){
		p.getXp(10, 9);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.getXp(10, 16);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.getXp(10, 20);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.getXp(10, 24);
		}
	else if (block == Blocks.mycelium){
		p.getXp(10, 28);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.getXp(10, 32);
		}
	else if (block == Blocks.soul_sand){
		p.getXp(10, 35);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.getXp(10, 40);
		}
	else if (block == MarkBlocks.CrystSand){
		p.getXp(10, 45);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.getXp(10, 50);
		}


	else if (block == Blocks.log){
		p.getXp(11, 10);
		}
	else if (block == Blocks.cactus){
		p.getXp(11, 12);
		}
	else if (block == Blocks.log2){
		p.getXp(11, 18);
		}
	else if (block == MarkBlocks.LogYew){
		p.getXp(11, 30);

		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.getXp(11, 45);

		}
	else if (block == MarkBlocks.LogCrystWood){
		p.getXp(11, 60);
		}

	else {

		}

	if (notnull == true){
		p.getEventXp();
		MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
	}
}
}

 

and here is the console:

[14:27:53] [server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught
io.netty.handler.codec.EncoderException: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(4) exceeds writerIndex(1): UnpooledHeapByteBuf(ridx: 0, widx: 1, cap: 256)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:107) ~[MessageToMessageEncoder.class:4.0.23.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:4.0.23.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:4.0.23.Final]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:229) [simpleNetworkWrapper.class:?]
at com.modMark.Skill.EventHandlerMark.MinExcaWC_XP(EventHandlerMark.java:354) [EventHandlerMark.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_10_EventHandlerMark_MinExcaWC_XP_BreakEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:55) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?]
at net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(ForgeHooks.java:684) [ForgeHooks.class:?]
at net.minecraft.server.management.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:299) [itemInWorldManager.class:?]
at net.minecraft.server.management.ItemInWorldManager.onBlockClicked(ItemInWorldManager.java:164) [itemInWorldManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:551) [NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:56) [C07PacketPlayerDigging.class:?]
at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:12) [C07PacketPlayerDigging.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) [PacketThreadUtil$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_40]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_40]
at net.minecraft.util.Util.runTask(Util.java:22) [util.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:681) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_40]
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(4) exceeds writerIndex(1): UnpooledHeapByteBuf(ridx: 0, widx: 1, cap: 256)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1175) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:619) ~[AbstractByteBuf.class:4.0.23.Final]
at net.minecraft.network.PacketBuffer.readInt(PacketBuffer.java:697) ~[PacketBuffer.class:?]
at com.modMark.Packets.SkillPacket.toBytes(SkillPacket.java:30) ~[skillPacket.class:?]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:11) ~[simpleIndexedCodec.class:?]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:7) ~[simpleIndexedCodec.class:?]
at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.encode(FMLIndexedMessageToMessageCodec.java:55) ~[FMLIndexedMessageToMessageCodec.class:?]
at io.netty.handler.codec.MessageToMessageCodec$1.encode(MessageToMessageCodec.java:67) ~[MessageToMessageCodec$1.class:4.0.23.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:89) ~[MessageToMessageEncoder.class:4.0.23.Final]
... 27 more

my Mod: Extended RPG [W.I.P]

Posted

yeah but i need some methods/fields outside their class. but then eclipse gives me errors with "make it static" and if i do, the error disappears. if i use the methods/fields inside their class, i can use "this.

but okay here are my files again.

EventHandler:

package com.modMark.Skill;

import java.util.List;

import com.modMark.Item_Block.MarkBlocks;
import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {

public static boolean notnull;





@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
	if (event.entity instanceof EntityPlayer && MarkData.get((EntityPlayer) event.entity) == null){	
		MarkData.register((EntityPlayer) event.entity);
		System.out.println("Creating properties for the player" + event.entity.getName());
	}


}

@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
    if (event.entity instanceof EntityPlayer) {
        MarkData.get((EntityPlayer) event.entity).RequestingSync();
    }
}

@SubscribeEvent
public void onPlayerCloned(PlayerEvent.Clone event) {
    NBTTagCompound compound = new NBTTagCompound();
    MarkData.get(event.original).saveReviveRelevantNBTData(compound, event.wasDeath);
    MarkData.get(event.entityPlayer).loadNBTData(compound);
}
@SubscribeEvent
public void Farming(SaplingGrowTreeEvent event)
{
	//problem: need to put what player placed the block

}




@SubscribeEvent
public void MinExcaWCFarm_Req(BreakSpeed event)
{
	//Event for req level Mining, Excavation, Woodcutting & Farming
	EntityPlayer player = event.entityPlayer;
	MarkData p = MarkData.get(player);

	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		p.requireLvl(8, 0);
		}


	if (block == Blocks.wheat){
		p.requireLvl(7, 0);
		}
	if (block == Blocks.carrots){
		p.requireLvl(7, 5);
		}
	if (block == Blocks.potatoes){
		p.requireLvl(7, 10);
		}



	if (block == Blocks.coal_ore){
		p.requireLvl(8, 5);
		}
	if (block == Blocks.emerald_ore){
		p.requireLvl(8, 10);
		}
	if (block == Blocks.iron_ore){
		p.requireLvl(8, 20);
		}
	if (block == Blocks.lapis_ore){
		p.requireLvl(8, 25);
		}
	if (block == Blocks.gold_ore){
		p.requireLvl(8, 30);
		}
	if (block == Blocks.diamond_ore){
		p.requireLvl(8, 40);
		}
	if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		p.requireLvl(8, 45);
		}
	if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		p.requireLvl(8, 50);
		}
	if (block == MarkBlocks.OreNetherite){
		p.requireLvl(8, 60);
		}
	if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		p.requireLvl(8, 70);
		}
	if (block == MarkBlocks.CrystRack){
		p.requireLvl(8, 75);
		}
	if (block == MarkBlocks.OreCrystlium){
		p.requireLvl(8, 80);
		}



	//excavation
	if (block == Blocks.dirt || block == Blocks.grass){
		p.requireLvl(10, 0);
		}
	if (block == MarkBlocks.GemOpalOre){
		p.requireLvl(10, 5);
		}
	if (block == Blocks.gravel){
		p.requireLvl(10, 5);
		}
	if (block == MarkBlocks.GemSapphireOre){
		p.requireLvl(10, 10);
		}
	if (block == Blocks.sand){
		p.requireLvl(10, 10);
		}
	if (block == MarkBlocks.GemOlivineOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemHyacinthOre){
		p.requireLvl(10, 15);
		}
	if (block == MarkBlocks.GemTopazOre){
		p.requireLvl(10, 25);;
		}
	if (block == Blocks.mycelium){
		p.requireLvl(10, 30);
		}
	if (block == MarkBlocks.GemAmethystOre){
		p.requireLvl(10, 40);
		}
	if (block == Blocks.soul_sand){
		p.requireLvl(10, 50);
		}
	if (block == MarkBlocks.GemSiamOre){
		p.requireLvl(10, 60);
		}
	if (block == MarkBlocks.CrystSand){
		p.requireLvl(10, 75);
		}
	if (block == MarkBlocks.GemAquamarineOre){
		p.requireLvl(10, 80);
		}


	if (block == Blocks.log){
		p.requireLvl(11, 0);
		}
	if (block == Blocks.cactus){
		p.requireLvl(11, 10);
		}
	if (block == Blocks.log2){
		p.requireLvl(11, 20);
		}
	if (block == MarkBlocks.LogYew){
		p.requireLvl(11, 40);
		}
	if (block == MarkBlocks.LogNetherBranch){
		p.requireLvl(11, 60);
		}
	if (block == MarkBlocks.LogCrystWood){
		p.requireLvl(11, 80);
		}

	if (MarkData.candothis == false){
	event.setCanceled(true);
	}	
}



@SubscribeEvent
public void MinExcaWC_XP(BreakEvent event){

	EntityPlayer player = event.getPlayer();
	MarkData p = MarkData.get(player);
	Block block = event.state.getBlock();


	if (block != null || block != Blocks.air){
		this.notnull = true;
	}
	else{ this.notnull = false; }
	if (block == Blocks.stone || block == Blocks.cobblestone){	
		p.addXp(8, ;
		}



	else if (block == Blocks.wheat && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 5);
	}
	else if (block == Blocks.carrots && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 7);
	}
	else if (block == Blocks.potatoes && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 9);
	}

	//mining
	else if (block == Blocks.coal_ore){
		p.addXp(8, 12);
		}
	else if (block == Blocks.emerald_ore){
		p.addXp(8, 16);
		}
	else if (block == Blocks.iron_ore){
		p.addXp(8, 20);
		}
	else if (block == Blocks.lapis_ore){
		p.addXp(8, 24);
		}
	else if (block == Blocks.gold_ore){
		p.addXp(8, 28);
		}
	else if (block == Blocks.diamond_ore){
		p.addXp(8, 32);
		}
	else if (block == Blocks.redstone_ore){
		p.addXp(8, 33);
		}
	else if (block == Blocks.obsidian){
		p.addXp(8, 34);
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		p.addXp(8, 35);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.addXp(8, 40);
		}
	else if (block == Blocks.quartz_ore){
		p.addXp(8, 42);
		}
	else if (block == MarkBlocks.CrystRack){
		p.addXp(8, 45);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.addXp(8, 50);
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		p.addXp(10, 5);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.addXp(10, ;
		}
	else if (block == Blocks.gravel){
		p.addXp(10, 7);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.addXp(10, 12);
		}
	else if (block == Blocks.sand){
		p.addXp(10, 9);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.addXp(10, 16);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.addXp(10, 20);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.addXp(10, 24);
		}
	else if (block == Blocks.mycelium){
		p.addXp(10, 28);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.addXp(10, 32);
		}
	else if (block == Blocks.soul_sand){
		p.addXp(10, 35);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.addXp(10, 40);
		}
	else if (block == MarkBlocks.CrystSand){
		p.addXp(10, 45);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.addXp(10, 50);
		}


	else if (block == Blocks.log){
		p.addXp(11, 10);
		}
	else if (block == Blocks.cactus){
		p.addXp(11, 12);
		}
	else if (block == Blocks.log2){
		p.addXp(11, 18);
		}
	else if (block == MarkBlocks.LogYew){
		p.addXp(11, 30);

		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.addXp(11, 45);

		}
	else if (block == MarkBlocks.LogCrystWood){
		p.addXp(11, 60);
		}

	else {

		}

	if (notnull == true){
		p.getXp();
		MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);

	}
}
}

MarkData (previous called XpSave, but i thought MarkData was a better name)

package com.modMark.Skill;

import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagIntArray;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;

public class MarkData implements IExtendedEntityProperties {

public static final String EXT_PLAYER136 = "ModMark136Data";
private final EntityPlayer player;
public static boolean candothis;
public static int[] XP = new int[35];

public MarkData(EntityPlayer player){
	this.player = player;
	for (int i = 0; i < 35; i++){
		XP[i] = 0;	
	}
	System.out.println("Set Xps to 0!!");
}
public final static void register(EntityPlayer player)
{
player.registerExtendedProperties(MarkData.EXT_PLAYER136, new MarkData(player));
}

public final static MarkData get(EntityPlayer player)
{
	return (MarkData) player.getExtendedProperties(EXT_PLAYER136);

}
public boolean isServerSide() {
    return this.player instanceof EntityPlayerMP;
}

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound Array = new NBTTagCompound();

	Array.setIntArray("Skill136", this.getXp());

	compound.setTag(EXT_PLAYER136 , Array);

}

@Override
public void loadNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PLAYER136);

		if (compound.hasKey("Skill136", 11)){
		this.setXP(properties.getIntArray("Skill136"));
		System.out.println("Loading Xp Levels");

	}
}

@Override
public void init(Entity entity, World world) {

}


public void setXP(int[] Xp){

	XP = Xp;
}

public int addXp(int SkillID, int amount){
	Skill.Lvlcalc(player);
	Skill.getSkillName();
	if((XP[skillID] + amount) >= Skill.NextLevel[skillID] && XP[skillID] < Skill.NextLevel[skillID]){
	ChatComponentText component = new ChatComponentText("Congratulations! Your Level in " + Skill.SkillName[skillID] + " is now " + (Skill.Level[skillID]+ 1));
	player.addChatComponentMessage(component);
	}
	//ChatComponentText component2 = new ChatComponentText(Skill.SkillName[skillID] + " XP: " + (XP[skillID] + amount));
	//player.addChatComponentMessage(component2);
	return XP[skillID] += amount;


}

public void requireLvl(int SkillID, int reqlvl){
	Skill.getSkillName();
	candothis = Skill.Level[skillID] >= reqlvl;
	if(candothis == false){
		ChatComponentText component = new ChatComponentText("You need " + reqlvl + " " + Skill.SkillName[skillID] + " for this");
		player.addChatComponentMessage(component);
	}


}

public int[] getXp() {

for (int i = 0;i < 35; i++){
	if ((XP[i]) > 500000 && Skill.MainLock == 1){
		XP[i] = 500000;

	}
	else if ((XP[i]) > 85000000 && Skill.MainLock == 2){

		XP[i] = 85000000;
	}
	else if ((XP[i]) > 2000000000 && Skill.MainLock == 3){

		XP[i] = 2000000000;
	}

}
return XP;
}

public void sync() {
    if (this.isServerSide()){
        MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
    }
}
public void RequestingSync() {
    if (!this.isServerSide())
    	MainRegistry.network.sendToServer(new SkillPacket());
}

public void saveReviveRelevantNBTData(NBTTagCompound compound, boolean wasDeath) {

        this.saveNBTData(compound);
}
}

And the Packet+PacketHandler class,(i did the IMessageHandler class as an inner class of IMessage, to make it more "organisable"

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import com.modMark.Skill.Skill;

import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{

private int ID;
private int[] XP = new int[35];

public SkillPacket() {}
public SkillPacket(EntityPlayer E,int[] s ){
	this.ID = E.getEntityId();
	this.XP = s;

}


@Override
public void fromBytes(ByteBuf buf) {
	for (int k = 0; k < 35; k++){
		this.XP[k] = buf.readInt();
	}
		this.ID = buf.readInt();
}

@Override
public void toBytes(ByteBuf buf) {
	for (int j = 0; j < 35; j++){
		buf.writeInt(this.XP[j]);
		}
		buf.writeInt(this.ID);
}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {
					for (int i = 0; i < 35; i++){

					//still need something to get my message here.


					}
					//ChatComponentText component2 = new ChatComponentText(player.getName() + " Excavation "  + " XP: " + p.XP[10]);
					//player.addChatComponentMessage(component2);
                    
                }
			});
	return null;
}

}
}

 

my Mod: Extended RPG [W.I.P]

Posted

srry then, i tried as much to change as many static field/method to non-statics

finally, he saves my stats(or something like that). but got a little problem if i play my mod with more people.

i check some events (breakEvent/ItemCraftedEvent/ItemSmeltedEvent) to get XP. but if a player is influent by an event. I always get XP and the other player gets XP only if he craft/smelt/break something or event don't get xp at all.

 

so whats the problem?(also, i hope my files are better now :) )

EventHandlerMark (contains EventHandler)

package com.modMark.Skill;

import java.util.List;

import com.modMark.Item_Block.MarkBlocks;
import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {







@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
	if (event.entity instanceof EntityPlayer && MarkData.get((EntityPlayer) event.entity) == null){	
		MarkData.register((EntityPlayer) event.entity);
		System.out.println("Registering Player!");
	}
    else if(event.entity instanceof EntityPlayer && MarkData.get((EntityPlayer) event.entity) != null){
    	NBTTagCompound compound = new NBTTagCompound();
    	MarkData.get((EntityPlayer)event.entity).loadNBTData(compound);
    } else{}


}




@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
	if (event.entity instanceof EntityPlayer) {
        MarkData.get((EntityPlayer) event.entity).RequestingSync();
        System.out.println("PlayerData is from onEntityJoinWorld");
    } 
    
    
}



@SubscribeEvent
public void onPlayerCloned(PlayerEvent.Clone event) {
    NBTTagCompound compound = new NBTTagCompound();
    MarkData.get(event.original).saveReviveRelevantNBTData(compound, event.wasDeath);
    MarkData.get(event.entityPlayer).loadNBTData(compound);
    System.out.println("PlayerData is Cloned");
}
@SubscribeEvent
public void Farming(SaplingGrowTreeEvent event)
{
	//problem: need to put what player placed the block

}




@SubscribeEvent
public void MinExcaWCFarm_Req(BreakSpeed event)
{
	//Event for req level Mining, Excavation, Woodcutting & Farming
	EntityPlayer player = event.entityPlayer;
	MarkData p = MarkData.get(player);
	System.out.println("PlayerData is from BreakSpeedEvent");
	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		p.requireLvl(8, 0, 0);
		}


	else if (block == Blocks.wheat){
		p.requireLvl(7, 0, 0);
		}
	else if (block == Blocks.carrots){
		p.requireLvl(7, 5, 0);
		}
	else if (block == Blocks.potatoes){
		p.requireLvl(7, 10, 0);
		}



	else if (block == Blocks.coal_ore){
		p.requireLvl(8, 5, 0);
		}
	else if (block == Blocks.emerald_ore){
		p.requireLvl(8, 10, 0);
		}
	else if (block == Blocks.iron_ore){
		p.requireLvl(8, 20, 0);
		}
	else if (block == Blocks.lapis_ore){
		p.requireLvl(8, 25, 0);
		}
	else if (block == Blocks.gold_ore){
		p.requireLvl(8, 30, 0);
		}
	else if (block == Blocks.diamond_ore){
		p.requireLvl(8, 40, 0);
		}
	else if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		p.requireLvl(8, 45, 0);
		}
	else if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		p.requireLvl(8, 50, 0);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.requireLvl(8, 60, 0);
		}
	else if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		p.requireLvl(8, 70, 0);
		}
	else if (block == MarkBlocks.CrystRack){
		p.requireLvl(8, 75, 0);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.requireLvl(8, 80, 0);
		}



	//excavation
	else if (block == Blocks.dirt || block == Blocks.grass){
		p.requireLvl(10, 0, 0);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.requireLvl(10, 5, 0);
		}
	else if (block == Blocks.gravel){
		p.requireLvl(10, 5, 0);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.requireLvl(10, 10, 0);
		}
	else if (block == Blocks.sand){
		p.requireLvl(10, 10, 0);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.requireLvl(10, 15, 0);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.requireLvl(10, 15, 0);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.requireLvl(10, 25, 0);
		}
	else if (block == Blocks.mycelium){
		p.requireLvl(10, 30, 0);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.requireLvl(10, 40, 0);
		}
	else if (block == Blocks.soul_sand){
		p.requireLvl(10, 50, 0);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.requireLvl(10, 60, 0);
		}
	else if (block == MarkBlocks.CrystSand){
		p.requireLvl(10, 75, 0);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.requireLvl(10, 80, 0);
		}


	else if (block == Blocks.log){
		p.requireLvl(11, 0, 0);
		}
	else if (block == Blocks.cactus){
		p.requireLvl(11, 10, 0);
		}
	else if (block == Blocks.log2){
		p.requireLvl(11, 20, 0);
		}
	else if (block == MarkBlocks.LogYew){
		p.requireLvl(11, 40, 0);
		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.requireLvl(11, 60, 0);
		}
	else if (block == MarkBlocks.LogCrystWood){
		p.requireLvl(11, 80, 0);
		}

	if (MarkData.candothis == false){
	event.setCanceled(true);
	}	
}



@SubscribeEvent
public void MinExcaWC_XP(BreakEvent event){


	MarkData p = MarkData.get(event.getPlayer());


	System.out.println("PlayerData is from BreakEvent");
	Block block = event.state.getBlock();



	if (block == Blocks.stone || block == Blocks.cobblestone){	
		p.addXp(8, ;
		}



	else if (block == Blocks.wheat && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 5);
	}
	else if (block == Blocks.carrots && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 7);
	}
	else if (block == Blocks.potatoes && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 9);
	}

	//mining
	else if (block == Blocks.coal_ore){
		p.addXp(8, 12);
		}
	else if (block == Blocks.emerald_ore){
		p.addXp(8, 16);
		}
	else if (block == Blocks.iron_ore){
		p.addXp(8, 20);
		}
	else if (block == Blocks.lapis_ore){
		p.addXp(8, 24);
		}
	else if (block == Blocks.gold_ore){
		p.addXp(8, 28);
		}
	else if (block == Blocks.diamond_ore){
		p.addXp(8, 32);
		}
	else if (block == Blocks.redstone_ore){
		p.addXp(8, 33);
		}
	else if (block == Blocks.obsidian){
		p.addXp(8, 34);
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		p.addXp(8, 35);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.addXp(8, 40);
		}
	else if (block == Blocks.quartz_ore){
		p.addXp(8, 42);
		}
	else if (block == MarkBlocks.CrystRack){
		p.addXp(8, 45);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.addXp(8, 50);
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		p.addXp(10, 5);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.addXp(10, ;
		}
	else if (block == Blocks.gravel){
		p.addXp(10, 7);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.addXp(10, 12);
		}
	else if (block == Blocks.sand){
		p.addXp(10, 9);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.addXp(10, 16);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.addXp(10, 20);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.addXp(10, 24);
		}
	else if (block == Blocks.mycelium){
		p.addXp(10, 28);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.addXp(10, 32);
		}
	else if (block == Blocks.soul_sand){
		p.addXp(10, 35);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.addXp(10, 40);
		}
	else if (block == MarkBlocks.CrystSand){
		p.addXp(10, 45);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.addXp(10, 50);
		}


	else if (block == Blocks.log){
		p.addXp(11, 10);
		}
	else if (block == Blocks.cactus){
		p.addXp(11, 12);
		}
	else if (block == Blocks.log2){
		p.addXp(11, 18);
		}
	else if (block == MarkBlocks.LogYew){
		p.addXp(11, 30);

		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.addXp(11, 45);

		}
	else if (block == MarkBlocks.LogCrystWood){
		p.addXp(11, 60);
		}



		p.sync();
		p.getXp();



	}

@SubscribeEvent
public void PlayerInteractEvent(PlayerInteractEvent event){


	if(event.action == Action.LEFT_CLICK_BLOCK && event.face != null && event.pos != null && event.useBlock != null && event.useItem != null){
		EntityPlayer player =  event.entityPlayer;
		if(player.getCurrentEquippedItem() != null){
		Item item = player.getCurrentEquippedItem().getItem();
		MarkData p = MarkData.get(event.entityPlayer);


	//Stone

	if(item == Items.stone_hoe){ p.requireLvl(7, 10, 1); }
	else if(item == Items.stone_pickaxe){ p.requireLvl(8, 10, 1); }
	else if(item == Items.stone_shovel){ p.requireLvl(10, 10, 1); }
	else if(item == Items.stone_axe){ p.requireLvl(11, 10, 1); }
	//Iron
	else if(item == Items.iron_hoe){ p.requireLvl(7, 20, 1); }
	else if(item == Items.iron_pickaxe){ p.requireLvl(8, 20, 1); }
	else if(item == Items.iron_shovel){ p.requireLvl(10, 20, 1); }
	else if(item == Items.iron_axe){ p.requireLvl(11, 20, 1); }
	//Gold
	else if(item == Items.golden_hoe){ p.requireLvl(7, 30, 1); }
	else if(item == Items.golden_pickaxe){ p.requireLvl(8, 30, 1); }
	else if(item == Items.golden_shovel){ p.requireLvl(10, 30, 1); }
	else if(item == Items.golden_axe){ p.requireLvl(11, 30, 1); }
	//Diamond
	else if(item == Items.diamond_hoe){ p.requireLvl(7, 40, 1); }
	else if(item == Items.diamond_pickaxe){ p.requireLvl(8, 40, 1); }
	else if(item == Items.diamond_shovel){ p.requireLvl(10, 40, 1); }
	else if(item == Items.diamond_axe){ p.requireLvl(11, 40, 1); }
	else{p.requireLvl(10, 0, 1);}

	if (MarkData.candothisTool == false & event.action == Action.LEFT_CLICK_BLOCK){
		event.setCanceled(true);
	}
	else{}
	}
	else{}}else{}
}


@SubscribeEvent
public void ItemCraftedEvent(ItemCraftedEvent event){
	Item item = event.crafting.getItem();


	MarkData p = MarkData.get(event.player);
	if (p != null){

	//Tailory
	if(item == Item.getItemFromBlock(Blocks.wool)){ p.addXp(14, 5);}

	//Smithing
	if(item == Items.wooden_sword){ p.addXp(15, 3);}
	else if(item == Items.wooden_hoe){ p.addXp(15, 3);}
	else if(item == Items.wooden_shovel){ p.addXp(15, 3);}
	else if(item == Items.wooden_pickaxe){ p.addXp(15, 3);}
	else if(item == Items.wooden_axe){ p.addXp(15, 3);}

	else if(item == Items.stone_sword){ p.addXp(15, 9);}
	else if(item == Items.stone_hoe){ p.addXp(15, 9);}
	else if(item == Items.stone_shovel){ p.addXp(15, 6);}
	else if(item == Items.stone_pickaxe){ p.addXp(15, 12);}
	else if(item == Items.stone_axe){ p.addXp(15, 12);}

	else if(item == Items.iron_sword){ p.addXp(15, 19);}
	else if(item == Items.iron_hoe){ p.addXp(15, 19);}
	else if(item == Items.iron_shovel){ p.addXp(15, 11);}
	else if(item == Items.iron_pickaxe){ p.addXp(15, 27);}
	else if(item == Items.iron_axe){ p.addXp(15, 27);}

	else if(item == Items.golden_sword){ p.addXp(15, 25);}
	else if(item == Items.golden_hoe){ p.addXp(15, 25);}
	else if(item == Items.golden_shovel){ p.addXp(15, 14);}
	else if(item == Items.golden_pickaxe){ p.addXp(15, 36);}
	else if(item == Items.golden_axe){ p.addXp(15, 36);}

	else if(item == Items.diamond_sword){ p.addXp(15, 27);}
	else if(item == Items.diamond_hoe){ p.addXp(15, 27);}
	else if(item == Items.diamond_shovel){ p.addXp(15, 15);}
	else if(item == Items.diamond_pickaxe){ p.addXp(15, 39);}
	else if(item == Items.diamond_axe){ p.addXp(15, 39);}

	//Tanning
	else if(item == Items.leather){ p.addXp(16, 10);}
	else if(item == Items.leather_boots){ p.addXp(16, 16);}
	else if(item == Items.leather_helmet){ p.addXp(16, 20);}
	else if(item == Items.leather_leggings){ p.addXp(16, 28);}
	else if(item == Items.leather_chestplate){ p.addXp(16, 32);}
	//Jewelry
	//--
	//Fletching
	else if(item == Items.stick){ p.addXp(18, 4);}
	//Construction
	else if(item == Item.getItemFromBlock(Blocks.planks))
	{ p.addXp(22, 5);}
	else if(item == Item.getItemFromBlock(Blocks.bed)){ p.addXp(22, 30);}
	else if(item == Item.getItemFromBlock(Blocks.oak_door)||item == Item.getItemFromBlock(Blocks.spruce_door)||item == Item.getItemFromBlock(Blocks.birch_door)||item == Item.getItemFromBlock(Blocks.jungle_door))
	{ p.addXp(22, 30);}	
	else if(item == Item.getItemFromBlock(Blocks.oak_stairs)||item == Item.getItemFromBlock(Blocks.spruce_stairs)||item == Item.getItemFromBlock(Blocks.birch_stairs)||item == Item.getItemFromBlock(Blocks.jungle_stairs))
	{ p.addXp(22, 30);}	

	p.sync();
	p.getXp();
	}
}

@SubscribeEvent
public void ItemSmeltedEvent(ItemSmeltedEvent event){
	Item item = event.smelting.getItem();

	EntityPlayer player = event.player;
	MarkData p = MarkData.get(player);
	if (p != null){

	//smithing
	if(item == Item.getItemFromBlock(Blocks.stone)){ p.addXp(15, (3 * event.smelting.stackSize));}
	else if(item == Items.iron_ingot){ p.addXp(15, (8 * event.smelting.stackSize));}
	else if(item == Items.gold_ingot){ p.addXp(15, (11 * event.smelting.stackSize));}
	//juwelry
	else if(item == Item.getItemFromBlock(Blocks.glass)){ p.addXp(17, (4 * event.smelting.stackSize));}
	//cooking
	else if(item == Items.cooked_porkchop || item == Items.cooked_beef || item == Items.cooked_chicken|| item == Items.cooked_fish || item == Items.cooked_rabbit){ p.addXp(19, (4 * event.smelting.stackSize));}

		p.sync();
		p.getXp();
		}
}
}

MarkData  (contains IExtendedEntityProperties

package com.modMark.Skill;

import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagIntArray;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;

public class MarkData implements IExtendedEntityProperties {

public int MainLock = 1;

public EntityPlayer Player;
public int XpLock1 = 0;
public int XpLock2 = 0;
public int XpLock3 = 0;
public int XpLock4 = 0;
public int XpLock5 = 0;
public int XpLock6 = 0;
public int XpLock7 = 0;


public String[] SkillName = new String[35]; //head
 //head
public double[] Level1 = new double[35];
public int[] Level = new int[35]; //head
public double[] NextLevel0 = new double[35];
public double[] NextLevel1 = new double[35];
public int[] NextLevel = new int[35]; //head
public int[] XpNeed = new int[35]; //head
public double[] Degrees1 = new double[35];
public double[] Degrees = new double[35]; //head

public int Total;
public int Totalcb;
public int Totalga;
public int Totalar;
public int Totalsp;
public int Totalot;
public double Combat1;
public int Combat;


public static final String EXT_PLAYER136 = "ModMark136Data";
private final EntityPlayer player;
public static boolean candothis;
public static boolean candothisTool;
public static int[] XP = new int[35];

public MarkData(EntityPlayer player){
	this.player = player;

	for (int i = 0; i < 35; i++){
	if (this.XP[i] == 0){
		XP[i] = 0;	
	}

}
}
public static void register(EntityPlayer player)
{
player.registerExtendedProperties(MarkData.EXT_PLAYER136, new MarkData(player));
System.out.println("register Player");
}

public static MarkData get(EntityPlayer player)
{

	return (MarkData) player.getExtendedProperties(EXT_PLAYER136);


}
public boolean isServerSide() {
    return player instanceof EntityPlayerMP;
}

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound Array = new NBTTagCompound();

	Array.setIntArray("Skill136", this.getXp());

	compound.setTag(EXT_PLAYER136 , Array);
	System.out.println("Saving Xp Levels for " + player.getName() + " ," + Array);
}

@Override
public void loadNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PLAYER136);


		this.setXP(properties.getIntArray("Skill136"));
		System.out.println("Loading Xp Levels");




}
@Override
public void init(Entity entity, World world) {

}

public static void resetXP(){
	for (int i = 0; i < 35; i++)
	XP[i] = 0;
}

public void setXP(int[] Xp){

	this.XP = Xp;
}

public int addXp(int SkillID, int amount){



	this.Lvlcalc(player);
	this.setSkillName();
	if((XP[skillID] + amount) >= this.NextLevel[skillID] && XP[skillID] < this.NextLevel[skillID]){
	ChatComponentText component = new ChatComponentText("Congratulations! Your Level in " + this.SkillName[skillID] + " is now " + (this.Level[skillID]+ 1));
	player.addChatComponentMessage(component);
	}

	return this.XP[skillID] += amount;


}

//this is to check if the requirement level is high enough to do the action. 
//	SkillID = the ID of the skill.
//	reqlvl = the requirement level to do the action
//	method = the text that will apear
public void requireLvl(int SkillID, int reqlvl, int method){
	this.getSkillName();
	this.Lvlcalc(Player);

		if (method == 0){
			candothis = this.Level[skillID] >= reqlvl;
			if(candothis == false){
		ChatComponentText component = new ChatComponentText("You need " + reqlvl + " " + this.SkillName[skillID] + " for this");
		player.addChatComponentMessage(component);
		}}

		if (method == 1){
		candothisTool = this.Level[skillID] >= reqlvl;
		if(candothisTool == false){
		ChatComponentText component = new ChatComponentText("You need a level of " + reqlvl + " " + this.SkillName[skillID] + " to use this tool");
		player.addChatComponentMessage(component);
		}}
		else {}




}

public int[] getXp() {

for (int i = 0;i < 35; i++){
	if ((this.XP[i]) > 500000 && this.MainLock == 1){
		this.XP[i] = 500000;

	}
	else if ((this.XP[i]) > 85000000 && this.MainLock == 2){

		this.XP[i] = 85000000;
	}
	else if ((this.XP[i]) > 2000000000 && this.MainLock == 3){

		this.XP[i] = 2000000000;
	}

}
return this.XP;
}

public void sync() {
    if (this.isServerSide()){
    	
        MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
    }
}
public void RequestingSync() {
    if (!this.isServerSide())
    	MainRegistry.network.sendToServer(new SkillPacket());
}

public void saveReviveRelevantNBTData(NBTTagCompound compound, boolean wasDeath) {

        this.saveNBTData(compound);
}


public void setSkillName(){

	 this.SkillName[0] = "Constitution";
	 this.SkillName[1] = "Melee";
	 this.SkillName[2] = "Ranged";
	 this.SkillName[3] = "Magic";
	 this.SkillName[4] = "Defence";
	 this.SkillName[5] = "Endurance";
	 this.SkillName[6] = "Slayer";
	 this.SkillName[7] = "Farming";
	 this.SkillName[8] = "Mining";
	 this.SkillName[9] = "Hunter";
	 this.SkillName[10] = "Excavation";
	 this.SkillName[11] = "Woodcutting";
	 this.SkillName[12] = "Fishing";
	 this.SkillName[13] = "Archeology";
	 this.SkillName[14] = "Tailory";
	 this.SkillName[15] = "Smithing";
	 this.SkillName[16] = "Tanning";
	 this.SkillName[17] = "Jewelry";
	 this.SkillName[18] = "Fletching";
	 this.SkillName[19] = "Cooking";
	 this.SkillName[20] = "Herblore";
	 this.SkillName[21] = "Honour";
	 this.SkillName[22] = "Construction";
	 this.SkillName[23] = "Agility";
	 this.SkillName[24] = "Dungeoneering";
	 this.SkillName[25] = "Firemaking";
	 this.SkillName[26] = "Lifestock";
	 this.SkillName[27] = "Knowledge";
	 this.SkillName[28] = "Technology";
	 this.SkillName[29] = "Petting";
	 this.SkillName[30] = "Chemistry";
	 this.SkillName[31] = "Specility";
	 this.SkillName[32] = "Mutating";
	 this.SkillName[33] = "Fisioning";
	 this.SkillName[34] = "Fusioning";
	  
	}

public String getSkillName() {

	return "skill";
}

 public void Lvlcalc(EntityPlayer player) {
	Player = player;


for (int i = 0; i < 35;i++) {

 if (this.getXp()[i] == 2000000000){
	 this.Level1[i] = 255;
	}
	else if (this.getXp()[i] >= 1720000000 && this.getXp()[i] <= 1999999999){
		this.Level1[i] = 254;
		}
	else if (this.getXp()[i] >= 1480000000 && this.getXp()[i] <= 1719999999){
		this.Level1[i] = 253;
	}
	else if (this.getXp()[i] >= 1280000000 && this.getXp()[i] <= 1479999999){
		this.Level1[i] = 252;
	}
	else if (this.getXp()[i] >= 1120000000 && this.getXp()[i] <= 1279999999){
		this.Level1[i] = 251;
	}
	else if (this.getXp()[i] >= 1000000000 && this.getXp()[i] <= 1119999999){
		this.Level1[i] = 250;
	}

	else if (this.getXp()[i] >= 954238196 && this.getXp()[i] <= 999999999){
		this.Level1[i] = 249;
	}

	else if (this.getXp()[i] >= 100005814 && this.getXp()[i] <= 954238195){
		this.Level1[i] = ((Math.log(this.getXp()[i] + 8287)/Math.log(8287))-1)*192+1;
	}

	else if (this.getXp()[i] >= 70404413 && this.getXp()[i] <= 100005813){
		this.Level1[i] = 200;
	}

	else if (this.getXp()[i] >= 701754 && this.getXp()[i] <= 70404412){
		this.Level1[i] = ((Math.log10(this.getXp()[i] + 7480)/Math.log10(7480))-1)*194+1;
	}
	else if (this.getXp()[i] >= 409286 && this.getXp()[i] <= 701753){
		this.Level1[i] = 99;
	}
	else if (this.getXp()[i] <= 409285){
		this.Level1[i] = ((Math.log10(this.getXp()[i] + 522)/Math.log10(522))-1)*92+1;
	}
	else {
		this.Level1[i] = 0;
	}

 	this.Level[i] = (int) Math.floor(this.Level1[i]); /** floors this.Level down*/
	this.NextLevel0[i] = (int) (this.Level[i] + 1);  /** says Level + 1*/
	this.NextLevel[i] = (int) Math.ceil(this.NextLevel1[i]);
	this.XpNeed[i] = (int) (this.NextLevel[i] - this.getXp()[i]);

	if (this.Level[i] == 99 || this.Level[i] == 200 || this.Level[i] == 255) 
		{ this.Degrees[i] = 0; }
	else {
	this.Degrees[i] = ((this.getXp()[i] - Math.ceil(this.Degrees1[i])) / (this.NextLevel[i] - Math.ceil(this.Degrees1[i]))) * 39;
    }


	if (this.Level[i] < 99) {
		this.NextLevel1[i] = (Math.pow(522, (this.NextLevel0[i] - 1)/92 +1) - 522);
	}
	else if (this.Level[i] == 99) {
		this.NextLevel1[i] = 701754;
	}
	else if (this.Level[i] >= 100 && this.Level[i] < 200) {
		this.NextLevel1[i] = (Math.pow(7480, (this.NextLevel0[i] - 1)/194 +1) - 7480);
	}
	else if (this.Level[i] == 200) {
		this.NextLevel1[i] = 100005814;
	}
	else if (this.Level[i] >= 201 && this.Level[i] < 249) {
		this.NextLevel1[i] = (Math.pow(8287, (this.NextLevel0[i] - 1)/192 +1) - 8287);
	}
	else if (this.Level[i] == 249) {
		this.NextLevel1[i] = 1000000000;
	}
	else if (this.Level[i] == 250) {
		this.NextLevel1[i] = 1120000000;
	}
	else if (this.Level[i] == 251) {
		this.NextLevel1[i] = 1280000000;
	}
	else if (this.Level[i] == 252) {
		this.NextLevel1[i] = 1480000000;
	}
	else if (this.Level[i] == 253) {
		this.NextLevel1[i] = 1720000000;
	}
	else if (this.Level[i] == 254) {
		this.NextLevel1[i] = 2000000000;		
	}
	else {
		this.NextLevel1[i] = 0;
	}



	if (this.Level[i] <= 98) {
		this.Degrees1[i] = (Math.pow(522, (this.NextLevel0[i] - 2)/92 +1) - 522) ;
	}

	else if (this.Level[i] >= 100 && this.Level[i] <= 199) {
		this.Degrees1[i] = (Math.pow(7480, (this.NextLevel0[i] - 2)/194 +1) - 7480);
	}
	else if (this.Level[i] >= 201 && this.Level[i] <= 249) {
		this.Degrees1[i] = (Math.pow(8287, (this.NextLevel0[i] - 2)/192 +1) - 8287);
	}
	else if (this.Level[i] == 250) {
		this.Degrees1[i] = 1000000000;
	}
	else if (this.Level[i] == 251) {
		this.Degrees1[i] = 1120000000;
	}
	else if (this.Level[i] == 252) {
		this.Degrees1[i] = 1280000000;
	}
	else if (this.Level[i] == 253) {
		this.Degrees1[i] = 1480000000;
	}
	else if (this.Level[i] == 254) {
		this.Degrees1[i] = 1720000000;
	}

	else {
		this.Degrees1[i] = 0;
		}
	}
 }
 public void getCombatLvl(EntityPlayer player){
	 Player = player;
	 Lvlcalc(Player);
if(this.Level[1] >= this.Level[2] && this.Level[1] >= this.Level[3]){

	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[1] + this.Level[4]) / 765*350;
}
else if(this.Level[2] >= this.Level[3]){

	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[2] + this.Level[4]) / 765*350;
}
else
{
	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[3] + this.Level[4]) / 765*350;
}

Combat = (int) Math.floor(Combat1);
 }
 public void getTotalLvl(EntityPlayer player) {
	 Player = player;
	 Lvlcalc(Player);
Totalcb = this.Level[0] + this.Level[1] + this.Level[2] + this.Level[3] + this.Level[4] + this.Level[5] + this.Level[6];
Totalga = this.Level[7] + this.Level[8] + this.Level[9] + this.Level[10] + this.Level[11] + this.Level[12] + this.Level[13];
Totalar = this.Level[14] + this.Level[15] + this.Level[16] + this.Level[17] + this.Level[18] + this.Level[19] + this.Level[20];
Totalsp = this.Level[21] + this.Level[22] + this.Level[23] + this.Level[24] + this.Level[25] + this.Level[26] + this.Level[27];
Totalot = this.Level[28] + this.Level[29] + this.Level[30] + this.Level[31] + this.Level[32] + this.Level[33] + this.Level[34];

Total = Totalcb + Totalga + Totalar + Totalsp + Totalot;

}	
}

SkillPacket (contains IMessage and IMessageHandler)

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{

private int ID;
private int[] XP = new int[35];

public SkillPacket() {}
public SkillPacket(EntityPlayer E, int[] s ){
	this.ID = E.getEntityId();
	this.XP = s;

}


@Override
public void fromBytes(ByteBuf buf) {
	for (int k = 0; k < 35; k++){
		this.XP[k] = buf.readInt();
	}
		this.ID = buf.readInt();
}

@Override
public void toBytes(ByteBuf buf) {
	for (int j = 0; j < 35; j++){
		buf.writeInt(this.XP[j]);
		}
		buf.writeInt(this.ID);
}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(final SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {


					for (int i = 0; i < 35; i++){
						EntityPlayer player = Minecraft.getMinecraft().thePlayer;
					MarkData p = MarkData.get(player);

					 message.XP = p.getXp();


					}
					System.out.println("PlayerData is from the PacketHandler");
                    
                }
			});
	return null;
}

}
}

my Mod: Extended RPG [W.I.P]

Posted

Why is

candothis

still static?  It is the property you use to determine if the player being operated on can mine the block or not, yet this is still a shared value.

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.

Posted

Why is

candothis

still static?  It is the property you use to determine if the player being operated on can mine the block or not, yet this is still a shared value.

oops forgot to remove that static, but changed it :)

  • The code in
    onEntityConstructing

    is a mess and unnecessary. All you need in there is

    MarkData.register

    . No if-checks, no loading from empty NBT.

  • You send the entityID in your packet, but you never use it.
  • In your message handler you put stuff into the message instead of taking stuff out. This makes no sense.
  • The code in your IEEP is a mess, what in the heck are all those fields?
  • Overall your code formatting is a mess. Your indentation is absolutely inconsistent and it's all barely readable.

you need an if statement for onEntityConstruction to check if the entity is a player, otherwise you got a crash report like "entityRabbit cannot be cast to EntityPlayer." but i have make my IEEP more clearer so you can read it

here are my files again:

 

EventHandler:

package com.modMark.Skill;

import java.util.List;

import com.modMark.Item_Block.MarkBlocks;
import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import akka.actor.FSM.State;
import ibxm.Player;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockStone;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent;
import scala.reflect.internal.Trees.ThisSubstituter;



public class EventHandlerMark {







@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
	if (event.entity instanceof EntityPlayer && MarkData.get((EntityPlayer) event.entity) == null){	
		MarkData.register((EntityPlayer) event.entity);
		System.out.println("Registering Player!");
	}
}




@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
	if (event.entity instanceof EntityPlayer) {
        MarkData.get((EntityPlayer) event.entity).RequestingSync();
        System.out.println("PlayerData is from onEntityJoinWorld");
    } 
    
    
}



@SubscribeEvent
public void onPlayerCloned(PlayerEvent.Clone event) {
    NBTTagCompound compound = new NBTTagCompound();
    MarkData.get(event.original).saveReviveRelevantNBTData(compound, event.wasDeath);
    MarkData.get(event.entityPlayer).loadNBTData(compound);
    System.out.println("PlayerData is Cloned");
}
@SubscribeEvent
public void Farming(SaplingGrowTreeEvent event)
{
	//problem: need to put what player placed the block

}




@SubscribeEvent
public void MinExcaWCFarm_Req(BreakSpeed event)
{
	//Event for req level Mining, Excavation, Woodcutting & Farming
	EntityPlayer player = event.entityPlayer;
	MarkData p = MarkData.get(player);
	System.out.println("PlayerData is from BreakSpeedEvent");
	Block block = event.state.getBlock();
	if (block == Blocks.stone || block == Blocks.cobblestone){
		p.requireLvl(8, 0, 0);
		}


	else if (block == Blocks.wheat){
		p.requireLvl(7, 0, 0);
		}
	else if (block == Blocks.carrots){
		p.requireLvl(7, 5, 0);
		}
	else if (block == Blocks.potatoes){
		p.requireLvl(7, 10, 0);
		}



	else if (block == Blocks.coal_ore){
		p.requireLvl(8, 5, 0);
		}
	else if (block == Blocks.emerald_ore){
		p.requireLvl(8, 10, 0);
		}
	else if (block == Blocks.iron_ore){
		p.requireLvl(8, 20, 0);
		}
	else if (block == Blocks.lapis_ore){
		p.requireLvl(8, 25, 0);
		}
	else if (block == Blocks.gold_ore){
		p.requireLvl(8, 30, 0);
		}
	else if (block == Blocks.diamond_ore){
		p.requireLvl(8, 40, 0);
		}
	else if (block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ||block == Blocks.redstone_block || block == Blocks.obsidian ){
		p.requireLvl(8, 45, 0);
		}
	else if (block == Blocks.netherrack ||block == Blocks.nether_brick ){
		p.requireLvl(8, 50, 0);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.requireLvl(8, 60, 0);
		}
	else if (block == Blocks.quartz_ore || block == Blocks.quartz_block){
		p.requireLvl(8, 70, 0);
		}
	else if (block == MarkBlocks.CrystRack){
		p.requireLvl(8, 75, 0);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.requireLvl(8, 80, 0);
		}



	//excavation
	else if (block == Blocks.dirt || block == Blocks.grass){
		p.requireLvl(10, 0, 0);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.requireLvl(10, 5, 0);
		}
	else if (block == Blocks.gravel){
		p.requireLvl(10, 5, 0);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.requireLvl(10, 10, 0);
		}
	else if (block == Blocks.sand){
		p.requireLvl(10, 10, 0);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.requireLvl(10, 15, 0);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.requireLvl(10, 15, 0);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.requireLvl(10, 25, 0);
		}
	else if (block == Blocks.mycelium){
		p.requireLvl(10, 30, 0);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.requireLvl(10, 40, 0);
		}
	else if (block == Blocks.soul_sand){
		p.requireLvl(10, 50, 0);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.requireLvl(10, 60, 0);
		}
	else if (block == MarkBlocks.CrystSand){
		p.requireLvl(10, 75, 0);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.requireLvl(10, 80, 0);
		}


	else if (block == Blocks.log){
		p.requireLvl(11, 0, 0);
		}
	else if (block == Blocks.cactus){
		p.requireLvl(11, 10, 0);
		}
	else if (block == Blocks.log2){
		p.requireLvl(11, 20, 0);
		}
	else if (block == MarkBlocks.LogYew){
		p.requireLvl(11, 40, 0);
		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.requireLvl(11, 60, 0);
		}
	else if (block == MarkBlocks.LogCrystWood){
		p.requireLvl(11, 80, 0);
		}

	if (p.candothis == false){
	event.setCanceled(true);
	}	
}



@SubscribeEvent
public void MinExcaWC_XP(BreakEvent event){


	MarkData p = MarkData.get(event.getPlayer());


	System.out.println("PlayerData is from BreakEvent");
	Block block = event.state.getBlock();



	if (block == Blocks.stone || block == Blocks.cobblestone){	
		p.addXp(8, ;
		}



	else if (block == Blocks.wheat && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 5);
	}
	else if (block == Blocks.carrots && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 7);
	}
	else if (block == Blocks.potatoes && (((Integer)event.state.getValue(BlockCrops.AGE)).intValue() == 7)){
		p.addXp(7, 9);
	}

	//mining
	else if (block == Blocks.coal_ore){
		p.addXp(8, 12);
		}
	else if (block == Blocks.emerald_ore){
		p.addXp(8, 16);
		}
	else if (block == Blocks.iron_ore){
		p.addXp(8, 20);
		}
	else if (block == Blocks.lapis_ore){
		p.addXp(8, 24);
		}
	else if (block == Blocks.gold_ore){
		p.addXp(8, 28);
		}
	else if (block == Blocks.diamond_ore){
		p.addXp(8, 32);
		}
	else if (block == Blocks.redstone_ore){
		p.addXp(8, 33);
		}
	else if (block == Blocks.obsidian){
		p.addXp(8, 34);
		}
	else if (block == Blocks.netherrack || block == Blocks.nether_brick){
		p.addXp(8, 35);
		}
	else if (block == MarkBlocks.OreNetherite){
		p.addXp(8, 40);
		}
	else if (block == Blocks.quartz_ore){
		p.addXp(8, 42);
		}
	else if (block == MarkBlocks.CrystRack){
		p.addXp(8, 45);
		}
	else if (block == MarkBlocks.OreCrystlium){
		p.addXp(8, 50);
		}




	else if (block == Blocks.dirt || block == Blocks.grass){
		p.addXp(10, 5);
		}
	else if (block == MarkBlocks.GemOpalOre){
		p.addXp(10, ;
		}
	else if (block == Blocks.gravel){
		p.addXp(10, 7);
		}
	else if (block == MarkBlocks.GemSapphireOre){
		p.addXp(10, 12);
		}
	else if (block == Blocks.sand){
		p.addXp(10, 9);
		}
	else if (block == MarkBlocks.GemOlivineOre){
		p.addXp(10, 16);
		}
	else if (block == MarkBlocks.GemHyacinthOre){
		p.addXp(10, 20);
		}
	else if (block == MarkBlocks.GemTopazOre){
		p.addXp(10, 24);
		}
	else if (block == Blocks.mycelium){
		p.addXp(10, 28);
		}
	else if (block == MarkBlocks.GemAmethystOre){
		p.addXp(10, 32);
		}
	else if (block == Blocks.soul_sand){
		p.addXp(10, 35);
		}
	else if (block == MarkBlocks.GemSiamOre){
		p.addXp(10, 40);
		}
	else if (block == MarkBlocks.CrystSand){
		p.addXp(10, 45);
		}
	else if (block == MarkBlocks.GemAquamarineOre){
		p.addXp(10, 50);
		}


	else if (block == Blocks.log){
		p.addXp(11, 10);
		}
	else if (block == Blocks.cactus){
		p.addXp(11, 12);
		}
	else if (block == Blocks.log2){
		p.addXp(11, 18);
		}
	else if (block == MarkBlocks.LogYew){
		p.addXp(11, 30);

		}
	else if (block == MarkBlocks.LogNetherBranch){
		p.addXp(11, 45);

		}
	else if (block == MarkBlocks.LogCrystWood){
		p.addXp(11, 60);
		}



		p.sync();
		p.getXp();



	}

@SubscribeEvent
public void PlayerInteractEvent(PlayerInteractEvent event){


	if(event.action == Action.LEFT_CLICK_BLOCK && event.face != null && event.pos != null && event.useBlock != null && event.useItem != null){
		EntityPlayer player =  event.entityPlayer;
		if(player.getCurrentEquippedItem() != null){
		Item item = player.getCurrentEquippedItem().getItem();
		MarkData p = MarkData.get(event.entityPlayer);


	//Stone

	if(item == Items.stone_hoe){ p.requireLvl(7, 10, 1); }
	else if(item == Items.stone_pickaxe){ p.requireLvl(8, 10, 1); }
	else if(item == Items.stone_shovel){ p.requireLvl(10, 10, 1); }
	else if(item == Items.stone_axe){ p.requireLvl(11, 10, 1); }
	//Iron
	else if(item == Items.iron_hoe){ p.requireLvl(7, 20, 1); }
	else if(item == Items.iron_pickaxe){ p.requireLvl(8, 20, 1); }
	else if(item == Items.iron_shovel){ p.requireLvl(10, 20, 1); }
	else if(item == Items.iron_axe){ p.requireLvl(11, 20, 1); }
	//Gold
	else if(item == Items.golden_hoe){ p.requireLvl(7, 30, 1); }
	else if(item == Items.golden_pickaxe){ p.requireLvl(8, 30, 1); }
	else if(item == Items.golden_shovel){ p.requireLvl(10, 30, 1); }
	else if(item == Items.golden_axe){ p.requireLvl(11, 30, 1); }
	//Diamond
	else if(item == Items.diamond_hoe){ p.requireLvl(7, 40, 1); }
	else if(item == Items.diamond_pickaxe){ p.requireLvl(8, 40, 1); }
	else if(item == Items.diamond_shovel){ p.requireLvl(10, 40, 1); }
	else if(item == Items.diamond_axe){ p.requireLvl(11, 40, 1); }
	else{p.requireLvl(10, 0, 1);}

	if (p.candothisTool == false & event.action == Action.LEFT_CLICK_BLOCK){
		event.setCanceled(true);
	}
	else{}
	}
	else{}}else{}
}


@SubscribeEvent
public void ItemCraftedEvent(ItemCraftedEvent event){
	Item item = event.crafting.getItem();


	MarkData p = MarkData.get(event.player);
	if (p != null){

	//Tailory
	if(item == Item.getItemFromBlock(Blocks.wool)){ p.addXp(14, 5);}

	//Smithing
	if(item == Items.wooden_sword){ p.addXp(15, 3);}
	else if(item == Items.wooden_hoe){ p.addXp(15, 3);}
	else if(item == Items.wooden_shovel){ p.addXp(15, 3);}
	else if(item == Items.wooden_pickaxe){ p.addXp(15, 3);}
	else if(item == Items.wooden_axe){ p.addXp(15, 3);}

	else if(item == Items.stone_sword){ p.addXp(15, 9);}
	else if(item == Items.stone_hoe){ p.addXp(15, 9);}
	else if(item == Items.stone_shovel){ p.addXp(15, 6);}
	else if(item == Items.stone_pickaxe){ p.addXp(15, 12);}
	else if(item == Items.stone_axe){ p.addXp(15, 12);}

	else if(item == Items.iron_sword){ p.addXp(15, 19);}
	else if(item == Items.iron_hoe){ p.addXp(15, 19);}
	else if(item == Items.iron_shovel){ p.addXp(15, 11);}
	else if(item == Items.iron_pickaxe){ p.addXp(15, 27);}
	else if(item == Items.iron_axe){ p.addXp(15, 27);}

	else if(item == Items.golden_sword){ p.addXp(15, 25);}
	else if(item == Items.golden_hoe){ p.addXp(15, 25);}
	else if(item == Items.golden_shovel){ p.addXp(15, 14);}
	else if(item == Items.golden_pickaxe){ p.addXp(15, 36);}
	else if(item == Items.golden_axe){ p.addXp(15, 36);}

	else if(item == Items.diamond_sword){ p.addXp(15, 27);}
	else if(item == Items.diamond_hoe){ p.addXp(15, 27);}
	else if(item == Items.diamond_shovel){ p.addXp(15, 15);}
	else if(item == Items.diamond_pickaxe){ p.addXp(15, 39);}
	else if(item == Items.diamond_axe){ p.addXp(15, 39);}

	//Tanning
	else if(item == Items.leather){ p.addXp(16, 10);}
	else if(item == Items.leather_boots){ p.addXp(16, 16);}
	else if(item == Items.leather_helmet){ p.addXp(16, 20);}
	else if(item == Items.leather_leggings){ p.addXp(16, 28);}
	else if(item == Items.leather_chestplate){ p.addXp(16, 32);}
	//Jewelry
	//--
	//Fletching
	else if(item == Items.stick){ p.addXp(18, 4);}
	//Construction
	else if(item == Item.getItemFromBlock(Blocks.planks))
	{ p.addXp(22, 5);}
	else if(item == Item.getItemFromBlock(Blocks.bed)){ p.addXp(22, 30);}
	else if(item == Item.getItemFromBlock(Blocks.oak_door)||item == Item.getItemFromBlock(Blocks.spruce_door)||item == Item.getItemFromBlock(Blocks.birch_door)||item == Item.getItemFromBlock(Blocks.jungle_door))
	{ p.addXp(22, 30);}	
	else if(item == Item.getItemFromBlock(Blocks.oak_stairs)||item == Item.getItemFromBlock(Blocks.spruce_stairs)||item == Item.getItemFromBlock(Blocks.birch_stairs)||item == Item.getItemFromBlock(Blocks.jungle_stairs))
	{ p.addXp(22, 30);}	

	p.sync();
	p.getXp();
	}
}

@SubscribeEvent
public void ItemSmeltedEvent(ItemSmeltedEvent event){
	Item item = event.smelting.getItem();

	EntityPlayer player = event.player;
	MarkData p = MarkData.get(player);
	if (p != null){

	//smithing
	if(item == Item.getItemFromBlock(Blocks.stone)){ p.addXp(15, (3 * event.smelting.stackSize));}
	else if(item == Items.iron_ingot){ p.addXp(15, (8 * event.smelting.stackSize));}
	else if(item == Items.gold_ingot){ p.addXp(15, (11 * event.smelting.stackSize));}
	//juwelry
	else if(item == Item.getItemFromBlock(Blocks.glass)){ p.addXp(17, (4 * event.smelting.stackSize));}
	//cooking
	else if(item == Items.cooked_porkchop || item == Items.cooked_beef || item == Items.cooked_chicken|| item == Items.cooked_fish || item == Items.cooked_rabbit){ p.addXp(19, (4 * event.smelting.stackSize));}

		p.sync();
		p.getXp();
		}
}
}

 

IEEP:

package com.modMark.Skill;

import com.modMark.Main.MainRegistry;
import com.modMark.Packets.SkillPacket;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagIntArray;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;

public class MarkData implements IExtendedEntityProperties {

//this field is used in getXP()
public int MainLock = 1;

//you know this
public EntityPlayer Player;
//this fields are some future this to unlock the locked skills
public int XpLock1 = 0;
public int XpLock2 = 0;
public int XpLock3 = 0;
public int XpLock4 = 0;
public int XpLock5 = 0;
public int XpLock6 = 0;
public int XpLock7 = 0;

//The name of the Skill
public String[] SkillName = new String[35]; //head
//this field are for calculating the skill levels ect
public double[] Level1 = new double[35];
public int[] Level = new int[35]; //head
public double[] NextLevel0 = new double[35];
public double[] NextLevel1 = new double[35];
public int[] NextLevel = new int[35]; //head
public int[] XpNeed = new int[35]; //head


//total and combat level
public int Total;

public double Combat1;
public int Combat;


public static final String EXT_PLAYER136 = "ModMark136Data";
private final EntityPlayer player;
public boolean candothis;
public boolean candothisTool;
public static int[] XP = new int[35];

public MarkData(EntityPlayer player){
	this.player = player;
	//sets the skill Xps to zero(i don't know i this makes sence)
	for (int i = 0; i < 35; i++){
	if (this.XP[i] == 0){
		XP[i] = 0;	
	}

}
}

public static void register(EntityPlayer player)
{
player.registerExtendedProperties(MarkData.EXT_PLAYER136, new MarkData(player));
System.out.println("register Player");
}



public static MarkData get(EntityPlayer player)
{

	return (MarkData) player.getExtendedProperties(EXT_PLAYER136);


}


public boolean isServerSide() {
    return player instanceof EntityPlayerMP;
}



@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound Array = new NBTTagCompound();

	Array.setIntArray("Skill136", this.getXp());

	compound.setTag(EXT_PLAYER136 , Array);
	System.out.println("Saving Xp Levels for " + player.getName() + " ," + Array);
}




@Override
public void loadNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PLAYER136);


		this.setXP(properties.getIntArray("Skill136"));
		System.out.println("Loading Xp Levels");




}
@Override
public void init(Entity entity, World world) {

}



public static void resetXP(){
	for (int i = 0; i < 35; i++)
	XP[i] = 0;
}



public void setXP(int[] Xp){

	this.XP = Xp;
}



public int addXp(int SkillID, int amount){



	this.Lvlcalc(player);
	this.setSkillName();
	if((XP[skillID] + amount) >= this.NextLevel[skillID] && XP[skillID] < this.NextLevel[skillID]){
	ChatComponentText component = new ChatComponentText("Congratulations! Your Level in " + this.SkillName[skillID] + " is now " + (this.Level[skillID]+ 1));
	player.addChatComponentMessage(component);
	}

	return this.XP[skillID] += amount;


}

//this is to check if the requirement level is high enough to do the action. 
//	SkillID = the ID of the skill.
//	reqlvl = the requirement level to do the action
//	method = the text that will apear
public void requireLvl(int SkillID, int reqlvl, int method){
	this.setSkillName();
	this.Lvlcalc(Player);

		if (method == 0){
			candothis = this.Level[skillID] >= reqlvl;
			if(candothis == false){
		ChatComponentText component = new ChatComponentText("You need " + reqlvl + " " + this.SkillName[skillID] + " for this");
		player.addChatComponentMessage(component);
		}}

		if (method == 1){
		candothisTool = this.Level[skillID] >= reqlvl;
		if(candothisTool == false){
		ChatComponentText component = new ChatComponentText("You need a level of " + reqlvl + " " + this.SkillName[skillID] + " to use this tool");
		player.addChatComponentMessage(component);
		}}
		else {}




}

public int[] getXp() {

for (int i = 0;i < 35; i++){
		if ((this.XP[i]) > 500000 && this.MainLock == 1)				{this.XP[i] = 500000;}
	else if ((this.XP[i]) > 85000000 && this.MainLock == 2)				{this.XP[i] = 85000000;}
	else if ((this.XP[i]) > 2000000000 && this.MainLock == 3)			{this.XP[i] = 2000000000;}

	}

return this.XP;

}




public void sync() {
    if (this.isServerSide()){
    	
        MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
    }
}
public void RequestingSync() {
    if (!this.isServerSide())
    	MainRegistry.network.sendToServer(new SkillPacket());
}
//saves data if death or end
public void saveReviveRelevantNBTData(NBTTagCompound compound, boolean wasDeath) {

        this.saveNBTData(compound);
}

//sets the name of the skill
public void setSkillName(){

	 this.SkillName[0] = "Constitution";
	 this.SkillName[1] = "Melee";
	 this.SkillName[2] = "Ranged";
	 this.SkillName[3] = "Magic";
	 this.SkillName[4] = "Defence";
	 this.SkillName[5] = "Endurance";
	 this.SkillName[6] = "Slayer";
	 this.SkillName[7] = "Farming";
	 this.SkillName[8] = "Mining";
	 this.SkillName[9] = "Hunter";
	 this.SkillName[10] = "Excavation";
	 this.SkillName[11] = "Woodcutting";
	 this.SkillName[12] = "Fishing";
	 this.SkillName[13] = "Archeology";
	 this.SkillName[14] = "Tailory";
	 this.SkillName[15] = "Smithing";
	 this.SkillName[16] = "Tanning";
	 this.SkillName[17] = "Jewelry";
	 this.SkillName[18] = "Fletching";
	 this.SkillName[19] = "Cooking";
	 this.SkillName[20] = "Herblore";
	 this.SkillName[21] = "Honour";
	 this.SkillName[22] = "Construction";
	 this.SkillName[23] = "Agility";
	 this.SkillName[24] = "Dungeoneering";
	 this.SkillName[25] = "Firemaking";
	 this.SkillName[26] = "Lifestock";
	 this.SkillName[27] = "Knowledge";
	 this.SkillName[28] = "Technology";
	 this.SkillName[29] = "Petting";
	 this.SkillName[30] = "Chemistry";
	 this.SkillName[31] = "Specility";
	 this.SkillName[32] = "Mutating";
	 this.SkillName[33] = "Fisioning";
	 this.SkillName[34] = "Fusioning";
	  
	}


//this methode is to calculate my XP to level(and this really works!!)
 public void Lvlcalc(EntityPlayer player) {
	Player = player;


for (int i = 0; i < 35;i++) {

		if (this.getXp()[i] == 2000000000)										{this.Level1[i] = 255;}
	else if (this.getXp()[i] >= 1720000000 && this.getXp()[i] <= 1999999999)	{this.Level1[i] = 254;}
	else if (this.getXp()[i] >= 1480000000 && this.getXp()[i] <= 1719999999)	{this.Level1[i] = 253;}
	else if (this.getXp()[i] >= 1280000000 && this.getXp()[i] <= 1479999999)	{this.Level1[i] = 252;}
	else if (this.getXp()[i] >= 1120000000 && this.getXp()[i] <= 1279999999)	{this.Level1[i] = 251;}
	else if (this.getXp()[i] >= 1000000000 && this.getXp()[i] <= 1119999999)	{this.Level1[i] = 250;}
	else if (this.getXp()[i] >= 954238196 && this.getXp()[i] <= 999999999)		{this.Level1[i] = 249;}
	else if (this.getXp()[i] >= 100005814 && this.getXp()[i] <= 954238195)		{this.Level1[i] = ((Math.log(this.getXp()[i] + 8287)/Math.log(8287))-1)*192+1;}
	else if (this.getXp()[i] >= 70404413 && this.getXp()[i] <= 100005813)		{this.Level1[i] = 200;}
	else if (this.getXp()[i] >= 701754 && this.getXp()[i] <= 70404412)			{this.Level1[i] = ((Math.log10(this.getXp()[i] + 7480)/Math.log10(7480))-1)*194+1;}
	else if (this.getXp()[i] >= 409286 && this.getXp()[i] <= 701753)			{this.Level1[i] = 99;}
	else if (this.getXp()[i] <= 409285)											{this.Level1[i] = ((Math.log10(this.getXp()[i] + 522)/Math.log10(522))-1)*92+1;}
	else 																		{this.Level1[i] = 0;}


 	this.Level[i] = (int) Math.floor(this.Level1[i]); /** floors this.Level down*/
	this.NextLevel0[i] = (int) (this.Level[i] + 1);  /** says Level + 1*/
	this.NextLevel[i] = (int) Math.ceil(this.NextLevel1[i]);
	this.XpNeed[i] = (int) (this.NextLevel[i] - this.getXp()[i]);


		if (this.Level[i] < 99) 												{this.NextLevel1[i] = (Math.pow(522, (this.NextLevel0[i] - 1)/92 +1) - 522);}
	else if (this.Level[i] == 99)												{this.NextLevel1[i] = 701754;}
	else if (this.Level[i] >= 100 && this.Level[i] < 200) 						{this.NextLevel1[i] = (Math.pow(7480, (this.NextLevel0[i] - 1)/194 +1) - 7480);}
	else if (this.Level[i] == 200) 												{this.NextLevel1[i] = 100005814;}
	else if (this.Level[i] >= 201 && this.Level[i] < 249) 						{this.NextLevel1[i] = (Math.pow(8287, (this.NextLevel0[i] - 1)/192 +1) - 8287);}
	else if (this.Level[i] == 249) 												{this.NextLevel1[i] = 1000000000;}
	else if (this.Level[i] == 250) 												{this.NextLevel1[i] = 1120000000;}
	else if (this.Level[i] == 251) 												{this.NextLevel1[i] = 1280000000;}
	else if (this.Level[i] == 252) 												{this.NextLevel1[i] = 1480000000;}
	else if (this.Level[i] == 253) 												{this.NextLevel1[i] = 1720000000;}
	else if (this.Level[i] == 254) 												{this.NextLevel1[i] = 2000000000;}
	else 																		{this.NextLevel1[i] = 0;}

	}}




 //to calculate the combat level
 public void getCombatLvl(EntityPlayer player){
	 Player = player;
	 Lvlcalc(Player);
if(this.Level[1] >= this.Level[2] && this.Level[1] >= this.Level[3]){

	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[1] + this.Level[4]) / 765*350;
}
else if(this.Level[2] >= this.Level[3]){

	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[2] + this.Level[4]) / 765*350;
}
else
{
	Combat1 = (Math.sqrt(this.Level[0]) * Math.sqrt(this.Level[5]) + this.Level[3] + this.Level[4]) / 765*350;
}

Combat = (int) Math.floor(Combat1);
 }







 //to calculate the Total Level----------------------------------------------------------------------
 public void getTotalLvl(EntityPlayer player) {
	 Player = player;
	 Lvlcalc(Player);
	 this.Total = 0;
for (int i = 0; i < 35; i++){
	Total += this.Level[i];
}

}	
}

 

PacketHandler thing:

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{



public SkillPacket() {}
public SkillPacket(EntityPlayer E, int[] s ){

	MarkData p = MarkData.get(Minecraft.getMinecraft().thePlayer);

	p.XP = s;

}


@Override
public void fromBytes(ByteBuf buf) {
	MarkData p = MarkData.get(Minecraft.getMinecraft().thePlayer);
	for (int k = 0; k < 35; k++){

		p.XP[k] = buf.readInt();
	}

}

@Override
public void toBytes(ByteBuf buf) {
	MarkData p = MarkData.get(Minecraft.getMinecraft().thePlayer);
	for (int j = 0; j < 35; j++){

		buf.writeInt(p.XP[j]);
		}

}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(final SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {


					for (int i = 0; i < 35; i++){

					MarkData p = MarkData.get(Minecraft.getMinecraft().thePlayer);

					 GuiStatlist.XP = p.XP;


					}
					System.out.println("PlayerData is from the PacketHandler");
                    
                }
			});
	return null;
}

}
}

 

the XP in guiStatlist wil be used to show in the gui, and works correctly :)

the bugs are still, I receive every package but my friends only got if they to something like it should be.

but the biggest problem is that everyone shares the same xp so if i mine, my friends gets mining xp to and visa versa.

my Mod: Extended RPG [W.I.P]

Posted

One major problem with your code is you are using Minecraft.getMinecraft().thePlayer almost everywhere. That is the CLIENT player only, and you should NOT use it pretty much ever. Use the player you pass to your constructor, e.g.:

public SkillPacket(EntityPlayer player, int[] s ) { // you pass 'player' here, use it!
MarkData p = MarkData.get(player); // here, instead of Minecraft.getMinecraft().thePlayer
p.XP = s;
}

 

However, the problem that you are experiencing is, still, that you do not understand the static keyword. Your IEEP#XP field CAN NOT be static lest you want every single player on the server to always have identical amounts of XP.

 

And please, use some constants for your skill IDs (or wrap them in class instances) - how is anyone supposed to know what skill 15 is? Your code is going to be a nightmare to debug down the road, if it isn't already.

Posted
//oh boy! we pass in an entity player! this is probably the one we want to do stuff to!
public SkillPacket(EntityPlayer E, int[] s ){

	//yeah! lets IGNORE THE FUCK OUT OF IT.
	MarkData p = MarkData.get(Minecraft.getMinecraft().thePlayer);

	p.XP = s;

}

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.

Posted

Okay, Changed my XP tot non-static, so now i understand that, but still got an console error

 

now, i gonna try again what i'm doing exactly

 

first, I mine a block.

then MinExcaWC_XP will be called.

 

public void MinExcaWC_XP(BreakEvent event){
// this Method Checks what Block What Player Breaks
// And then, this adds XP (I Checked if this works on Serverside, and it's all fine.)
// and tells to Synchronise

MarkData p = MarkData.get(event.getPlayer());
[...]
p.Sync();

}

 

Now we gonna Look at some things in the


public static MarkData get(EntityPlayer player)
{
	return (MarkData) player.getExtendedProperties(EXT_PLAYER136);
}

//it is nessesary to check if The Player is on the ServerSide, Otherwise you got an error like "EntityPlayerSP cannot be cast to EntityPlayerMP"
public boolean isServerSide() {
    return player instanceof EntityPlayerMP;
}

public void sync() {
    if (this.isServerSide()){
    	
        MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
        System.out.println("Player: " + player);
    }
}

 

here is the error:

[21:35:37] [server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught
io.netty.handler.codec.EncoderException: java.lang.NullPointerException
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:107) ~[MessageToMessageEncoder.class:4.0.23.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:4.0.23.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:4.0.23.Final]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:229) [simpleNetworkWrapper.class:?]
at com.modMark.Skill.MarkData.sync(MarkData.java:202) [MarkData.class:?]
at com.modMark.Skill.EventHandlerMark.MinExcaWC_XP(EventHandlerMark.java:373) [EventHandlerMark.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_9_EventHandlerMark_MinExcaWC_XP_BreakEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:55) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?]
at net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(ForgeHooks.java:684) [ForgeHooks.class:?]
at net.minecraft.server.management.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:299) [itemInWorldManager.class:?]
at net.minecraft.server.management.ItemInWorldManager.blockRemoving(ItemInWorldManager.java:251) [itemInWorldManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:562) [NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:56) [C07PacketPlayerDigging.class:?]
at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:12) [C07PacketPlayerDigging.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) [PacketThreadUtil$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_40]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_40]
at net.minecraft.util.Util.runTask(Util.java:22) [util.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:681) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_40]
Caused by: java.lang.NullPointerException
at com.modMark.Packets.SkillPacket.toBytes(SkillPacket.java:50) ~[skillPacket.class:?]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:11) ~[simpleIndexedCodec.class:?]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.encodeInto(SimpleIndexedCodec.java:7) ~[simpleIndexedCodec.class:?]
at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.encode(FMLIndexedMessageToMessageCodec.java:55) ~[FMLIndexedMessageToMessageCodec.class:?]
at io.netty.handler.codec.MessageToMessageCodec$1.encode(MessageToMessageCodec.java:67) ~[MessageToMessageCodec$1.class:4.0.23.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:89) ~[MessageToMessageEncoder.class:4.0.23.Final]
... 28 more

 

 

and my updated IMessage + IMessageHandler class:

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{

private EntityPlayer Player;
private int[] XP;

public SkillPacket() {}
public SkillPacket(int[] s, EntityPlayer player){
	MarkData p = MarkData.get(player);
	this.Player = player;
	s = p.getXp();
	XP = p.getXp();

	System.out.println("Test-1 Packet" + player);
}


@Override
public void fromBytes(ByteBuf buf) {

	for (int k = 0; k < 35; k++){

		XP[k] = buf.readInt();

	}
	System.out.println("Test-2 Packet" + Player + " Excavation XP: " + XP[10]);
}

@Override
public void toBytes(ByteBuf buf) {

	for (int j = 0; j < 35; j++){

		buf.writeInt(XP[j]);
		}
	System.out.println("Test-3 Packet" + Player + " Excavation XP: " + XP[10]);
}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(final SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {
					final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
					MarkData p = MarkData.get(player);
					GuiStatlist.XP = message.XP;

					System.out.println("PlayerData is send to " + player); 
                    
                }
			});
	return null;
}

}
}

 

I can feel i'm almost there. I know this code is maybe to complex for me. but I want the learn it.

I already created a very cool gui. some blocks(not the easiest) and some Items.

my Mod: Extended RPG [W.I.P]

Posted

...

 

public class SkillPacket implements IMessage{

private EntityPlayer Player;

//oh, you not gonna mis this laughery. Look at it, the perfect way to initialise an Array 
//-.-
private int[] XP;

// Changed to

private int

my Mod: Extended RPG [W.I.P]

Posted

public static SimpleNetworkWrapper network;

 

and in my pre-Init i got this

 

network = NetworkRegistry.INSTANCE.newSimpleChannel("mark13695");

network.registerMessage(SkillPacket.MarkHandler.class , SkillPacket.class, 0, Side.CLIENT);

 

no error anymore but my player is null:

this print: System.out.println("Test-3 Packet" + this.Player + " Excavation XP: " + XP[10]);

gives me this

[21:39:03] [Client thread/INFO] [sTDOUT]: [com.modMark.Packets.SkillPacket:toBytes:52]: Test-3 Packetnull Excavation XP: 0

my Mod: Extended RPG [W.I.P]

Posted

oh, was editing this class so much i forgotten to remove it

 

and:

 

[22:18:27] [Client thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_40]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_40]
at net.minecraft.util.Util.runTask(Util.java:23) [util.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1070) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]
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_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.NullPointerException
at com.modMark.Skill.MarkData.get(MarkData.java:80) ~[MarkData.class:?]
at com.modMark.Packets.SkillPacket$MarkHandler$1.run(SkillPacket.java:72) ~[skillPacket$MarkHandler$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_40]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_40]
at net.minecraft.util.Util.runTask(Util.java:22) ~[util.class:?]
... 15 more

 

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{

private int ID;
private int[] XP = new int[35];

public SkillPacket() {}
public SkillPacket(int[] s, EntityPlayer player){

	this.ID = player.getEntityId();
	this.XP = s;



	System.out.println("Test-1 Packet" + player);
}


@Override
public void fromBytes(ByteBuf buf) {

	for (int k = 0; k < 35; k++){

		this.XP[k] = buf.readInt();

	}
	this.ID = buf.readInt();
	System.out.println("Test-2 Packet " + ID + " Excavation XP: " + this.XP[10]);
}

@Override
public void toBytes(ByteBuf buf) {

	for (int j = 0; j < 35; j++){

		buf.writeInt(this.XP[j]);
		}
		buf.writeInt(this.ID);
	System.out.println("Test-3 Packet " + ID + " Excavation XP: " + XP[10]);
}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(final SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {
					final EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().theWorld.getEntityByID(message.ID);

					MarkData p = MarkData.get(player);
					p.XP = message.XP;
					message.XP = GuiStatlist.XP;

					System.out.println("PlayerData is send to " + player); 
                    
                }
			});
	return null;
}

}
}

 

[22:18:27] [server thread/INFO] [sTDOUT]: [com.modMark.Packets.SkillPacket:toBytes:56]: Test-3 Packet 0 Excavation XP: 0

my Mod: Extended RPG [W.I.P]

Posted

in the Methode sync in my IEEP class

i Changed this:

public void sync() {
    if (this.isServerSide()){
    	
        MainRegistry.network.sendTo(new SkillPacket(), (EntityPlayerMP) player);
        System.out.println("Player: " + player);
    }
}

 

to this

 

public void sync() {
    if (this.isServerSide()){
    	
        MainRegistry.network.sendTo(new SkillPacket([code]this.XP, this.player

), (EntityPlayerMP) player);

        System.out.println("Player: " + player);

    }

}[/code]

 

and again my Packet class:

package com.modMark.Packets;

import com.modMark.Main.GuiStatlist;
import com.modMark.Skill.MarkData;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IThreadListener;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class SkillPacket implements IMessage{

private int ID;
private int[] XP = new int[35];

public SkillPacket() {}
public SkillPacket(int[] s, EntityPlayer player){

	this.ID = player.getEntityId();
	this.XP = s;



	System.out.println("Test-1 Packet" + player);
}


@Override
public void fromBytes(ByteBuf buf) {

	for (int k = 0; k < 35; k++){

		this.XP[k] = buf.readInt();

	}
	this.ID = buf.readInt();
	System.out.println("Test-2 Packet " + ID + " Excavation XP: " + this.XP[10]);
}

@Override
public void toBytes(ByteBuf buf) {

	for (int j = 0; j < 35; j++){

		buf.writeInt(this.XP[j]);
		}
		buf.writeInt(this.ID);
	System.out.println("Test-3 Packet " + ID + " Excavation XP: " + XP[10]);
}


//-----------------------------------------------------------------------------------------------

public static class MarkHandler implements IMessageHandler<SkillPacket, IMessage > {

@Override
public IMessage onMessage(final SkillPacket message, MessageContext ctx) {
	IThreadListener ThreadListener = Minecraft.getMinecraft();
			ThreadListener.addScheduledTask(new Runnable() {
				@Override
                public void run() {
					final EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().theWorld.getEntityByID(message.ID);

					MarkData p = MarkData.get(player);
					p.setXP(message.XP);
					GuiStatlist.XP = p.XP; 

					System.out.println("PlayerData is send to " + player); 
                    
                }
			});
	return null;
}

}
}

 

it seems to work, but got one problem, unfortunatly its when a player gets XP, the player will be kicked out of the server, but i saw i don't get xp anymore from othore players breaking a block

 

this are the only logs i could found from the kick:

 

[22:59:11] [server thread/INFO]: Player2[/iP:Port] logged in with entity id 5742 at (25.5, 70.0, -96.5)
[22:59:11] [server thread/INFO]: Player2 joined the game
[22:59:12] [Client thread/INFO]: [CHAT] Player2 joined the game
[22:59:17] [server thread/INFO]: Player2 has just earned the achievement [Taking Inventory]
[22:59:17] [Client thread/INFO]: [CHAT] Player2 has just earned the achievement [Taking Inventory]
[22:59:44] [server thread/INFO]: Player2 lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
[22:59:44] [server thread/INFO]: Player2 left the game
[22:59:44] [Client thread/INFO]: [CHAT] Player2 left the game
[22:59:56] [user Authenticator #2/INFO]: UUID of player Player2 is e3b2d6e7-01a6-447d-ba3b-a08bc8adc2eb
[23:00:15] [server thread/INFO]: Player2 lost connection: TranslatableComponent{key='disconnect.genericReason', args=[internal Exception: java.io.IOException: The external host has lost connextion], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
[23:00:15] [server thread/INFO]: Player2 left the game
[23:00:15] [Client thread/INFO]: [CHAT] Player2 left the game
[23:00:32] [user Authenticator #3/INFO]: UUID of player Player2 is e3b2d6e7-01a6-447d-ba3b-a08bc8adc2eb
[23:00:51] [server thread/INFO]: Player2 lost connection: TranslatableComponent{key='disconnect.genericReason', args=[internal Exception: java.io.IOException: The external host has lost connextion], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}

oh well checked the wrong log :P

this is the error

[22:59:44] [Netty Server IO #4/ERROR] [FML/]: NetworkDispatcher exception
java.io.IOException: De externe host heeft een verbinding verbroken
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_25]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[?:1.8.0_25]
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446) ~[unpooledUnsafeDirectByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:225) ~[NioSocketChannel.class:4.0.23.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]

my Mod: Extended RPG [W.I.P]

Posted

found something out...

 

[22:59:44] [Netty Server IO #4/ERROR] [FML/]: NetworkDispatcher exception
java.io.IOException: De externe host heeft een verbinding verbroken
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_25]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[?:1.8.0_25]
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446) ~[unpooledUnsafeDirectByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:225) ~[NioSocketChannel.class:4.0.23.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
[22:59:44] [server thread/INFO] [sTDOUT/]: [com.modMark.Skill.MarkData:saveNBTData:99]: Saving Xp Levels for Player2 ,{Skill136:[0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]}
[22:59:56] [server thread/INFO] [sTDOUT/]: [com.modMark.Skill.MarkData:register:72]: register Player
[22:59:56] [server thread/INFO] [sTDOUT/]: [com.modMark.Skill.EventHandlerMark:onEntityConstructing:61]: Registering Player!
[22:59:56] [Netty Server IO #5/TRACE] [FML/]: Handshake channel activating
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]: FMLHandshakeServerState: null->FMLHandshakeServerState$1:START
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]:   Next: HELLO
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]: FMLHandshakeServerState: $ClientHello->FMLHandshakeServerState$2:HELLO
[22:59:56] [Netty Server IO #5/INFO] [FML/]: Client protocol version 2
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]:   Next: HELLO
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]: FMLHandshakeServerState: $ModList:4 mods->FMLHandshakeServerState$2:HELLO
[22:59:56] [Netty Server IO #5/INFO] [FML/]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],[email protected] test-6
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]:   Next: WAITINGCACK
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]: FMLHandshakeServerState: $HandshakeAck:{2}->FMLHandshakeServerState$3:WAITINGCACK
[22:59:56] [Netty Server IO #5/DEBUG] [FML/]:   Next: COMPLETE
[23:00:15] [Netty Server IO #5/ERROR] [FML/]: NetworkDispatcher exception
java.io.IOException: De externe host heeft een verbinding verbroken
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_25]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[?:1.8.0_25]
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446) ~[unpooledUnsafeDirectByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:225) ~[NioSocketChannel.class:4.0.23.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]

 

I think the issue here is that during the first login the handshake is processed fully as it should be, but later, it is'nt.

the first login he payloads the Register but SHOULD'NT on a second login or third.

 

and i still know always if i join a world he well registry.

 

ok, if i check the onEntityConstructing event:

@SubscribeEvent
public void onEntityConstructing(EntityConstructing event)
{		
//event.entity instanceof EntityPlayer = is the Entity a player
//MarkData.get((EntityPlayer) event.entity) == null , this checks if there is already data saved for the player
	if (event.entity instanceof EntityPlayer && MarkData.get((EntityPlayer) event.entity) == null){	
		MarkData.register((EntityPlayer) event.entity);
		System.out.println("Registering Player!");
	}
}

but strangly he will always tell that te if statment is true, because he always registers when log in, but if he register, the system noticed that theres already data available for the player

 

my Mod: Extended RPG [W.I.P]

Posted

yeah solve it, the error did'nt came from my mod but from something from internet connection

it works fine now. but you know, i'm writing a big mod so maybe i think i have more questions for other things that i can't get to work

thanks for the help :)

my Mod: Extended RPG [W.I.P]

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

    • Open the file and remove the # from # -Xmx4G
    • https://mclo.gs/uea1hj9 It should be easier to see the crash report in this format...sorry I'm new to this
    • Hello...I was wondering if somebody could help me with this crash. I was using chunky to pre-load chunks and this chunk, -473 285 (-7685 y 4560) seems to be corrupted or something. So like a dummy I teleported myself from the server console there and it crashed as soon as I would join the world. I used MCA selector to delete the problematic chunk and luckily it sent me back to my last known location. Can anyone see what is possibly causing this issue with the crash log? Anyway...here it is. My gosh this is frustrating. ---- Minecraft Crash Report ---- // Hi. I'm Connector, and I'm a crashaholic ========================= SINYTRA CONNECTOR IS PRESENT! Please verify issues are not caused by Connector before reporting them to mod authors. If you're unsure, file a report on Connector's issue tracker found at https://github.com/Sinytra/Connector/issues. ========================= // You should try our sister game, Minceraft! Time: 2025-09-05 03:24:05 Description: Feature placement java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.Level.m_8055_(net.minecraft.core.BlockPos)" because "this.f_58857_" is null     at net.minecraft.world.level.block.entity.JukeboxBlockEntity.m_271871_(JukeboxBlockEntity.java:76) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:fabric-transfer-api-v1.mixins.json:JukeboxBlockEntityMixin from mod fabric_transfer_api_v1,pl:mixin:APP:amendments-common.mixins.json:JukeboxBlockEntityMixin from mod amendments,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.block.entity.JukeboxBlockEntity.m_7407_(JukeboxBlockEntity.java:132) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:fabric-transfer-api-v1.mixins.json:JukeboxBlockEntityMixin from mod fabric_transfer_api_v1,pl:mixin:APP:amendments-common.mixins.json:JukeboxBlockEntityMixin from mod amendments,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_8016_(ContainerSingleItem.java:37) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_272108_(ContainerSingleItem.java:28) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_6211_(ContainerSingleItem.java:20) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.Clearable.m_18908_(Clearable.java:10) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.m_230328_(StructureTemplate.java:232) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A,re:classloading,xf:fml:forge:forge_method_redirector,pl:mixin:APP:betterdungeons.mixins.json:DungeonContextMixin from mod betterdungeons,pl:mixin:APP:betterdungeons.mixins.json:StructureTemplateMixin from mod betterdungeons,pl:mixin:APP:cataclysm.mixins.json:StructureTemplateMixin from mod cataclysm,pl:mixin:APP:lithostitched.mixins.json:common.StructureTemplateMixin from mod lithostitched,pl:mixin:APP:dungeonnowloading.forge.mixins.json:structures.StructureTemplateMixin from mod dungeonnowloading,pl:mixin:APP:integrated_api-common.mixins.json:structures.StructureTemplateMixin from mod integrated_api,pl:mixin:APP:integrated_api-common.mixins.json:structures.TemplateAccessor from mod integrated_api,pl:mixin:APP:blueprint.mixins.json:StructureTemplateMixin from mod blueprint,pl:mixin:APP:zeta.mixins.json:StructureTemplateMixin from mod zeta,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.TemplateStructurePiece.m_213694_(TemplateStructurePiece.java:83) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:computing_frames,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A,re:mixin,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.structures.OceanRuinPieces$OceanRuinPiece.m_213694_(OceanRuinPieces.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.StructureStart.m_226850_(StructureStart.java:90) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:blueprint.mixins.json:StructureStartMixin from mod blueprint,pl:mixin:APP:zeta.mixins.json:StructureStartMixin from mod zeta,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkGenerator.m_223080_(ChunkGenerator.java:320) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar%2374!/:?] {re:mixin}     at net.minecraft.world.level.chunk.ChunkGenerator.m_213609_(ChunkGenerator.java:319) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_279978_(ChunkStatus.java:108) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.m_214024_(ChunkStatus.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_280308_(ChunkStatus.java:252) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?] {}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Suspected Mods: NONE Stacktrace:     at net.minecraft.world.level.block.entity.JukeboxBlockEntity.m_271871_(JukeboxBlockEntity.java:76) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:fabric-transfer-api-v1.mixins.json:JukeboxBlockEntityMixin from mod fabric_transfer_api_v1,pl:mixin:APP:amendments-common.mixins.json:JukeboxBlockEntityMixin from mod amendments,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.block.entity.JukeboxBlockEntity.m_7407_(JukeboxBlockEntity.java:132) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:fabric-transfer-api-v1.mixins.json:JukeboxBlockEntityMixin from mod fabric_transfer_api_v1,pl:mixin:APP:amendments-common.mixins.json:JukeboxBlockEntityMixin from mod amendments,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_8016_(ContainerSingleItem.java:37) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_272108_(ContainerSingleItem.java:28) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.ticks.ContainerSingleItem.m_6211_(ContainerSingleItem.java:20) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.Clearable.m_18908_(Clearable.java:10) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.m_230328_(StructureTemplate.java:232) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A,re:classloading,xf:fml:forge:forge_method_redirector,pl:mixin:APP:betterdungeons.mixins.json:DungeonContextMixin from mod betterdungeons,pl:mixin:APP:betterdungeons.mixins.json:StructureTemplateMixin from mod betterdungeons,pl:mixin:APP:cataclysm.mixins.json:StructureTemplateMixin from mod cataclysm,pl:mixin:APP:lithostitched.mixins.json:common.StructureTemplateMixin from mod lithostitched,pl:mixin:APP:dungeonnowloading.forge.mixins.json:structures.StructureTemplateMixin from mod dungeonnowloading,pl:mixin:APP:integrated_api-common.mixins.json:structures.StructureTemplateMixin from mod integrated_api,pl:mixin:APP:integrated_api-common.mixins.json:structures.TemplateAccessor from mod integrated_api,pl:mixin:APP:blueprint.mixins.json:StructureTemplateMixin from mod blueprint,pl:mixin:APP:zeta.mixins.json:StructureTemplateMixin from mod zeta,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.TemplateStructurePiece.m_213694_(TemplateStructurePiece.java:83) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:computing_frames,pl:connector_pre_launch:A,re:classloading,pl:connector_pre_launch:A,re:mixin,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.structures.OceanRuinPieces$OceanRuinPiece.m_213694_(OceanRuinPieces.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A}     at net.minecraft.world.level.levelgen.structure.StructureStart.m_226850_(StructureStart.java:90) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:blueprint.mixins.json:StructureStartMixin from mod blueprint,pl:mixin:APP:zeta.mixins.json:StructureStartMixin from mod zeta,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkGenerator.m_223080_(ChunkGenerator.java:320) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar%2374!/:?] {re:mixin}     at net.minecraft.world.level.chunk.ChunkGenerator.m_213609_(ChunkGenerator.java:319) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_279978_(ChunkStatus.java:108) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.m_214024_(ChunkStatus.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_280308_(ChunkStatus.java:252) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?] {}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {} -- Feature -- Details:     Description: ResourceKey[minecraft:worldgen/structure / minecraft:ocean_ruin_warm] Stacktrace:     at net.minecraft.world.level.chunk.ChunkGenerator.m_213609_(ChunkGenerator.java:319) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_279978_(ChunkStatus.java:108) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.m_214024_(ChunkStatus.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_280308_(ChunkStatus.java:252) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?] {}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin} -- Generation -- Details:     CenterX: -473     CenterZ: 285     Seed: 1176945434636047048 Stacktrace:     at net.minecraft.world.level.chunk.ChunkGenerator.m_213609_(ChunkGenerator.java:319) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:citadel.mixins.json:ChunkGeneratorMixin from mod citadel,pl:mixin:APP:bettermineshafts.mixins.json:DisableVanillaMineshaftsMixin from mod bettermineshafts,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_279978_(ChunkStatus.java:108) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.m_214024_(ChunkStatus.java:309) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.world.level.chunk.ChunkStatus.m_280308_(ChunkStatus.java:252) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:connector_pre_launch:A}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?] {}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin} -- Chunk to be generated -- Details:     Location: -473,285     Position hash: 1228360646183     Generator: net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator@68ab688d Stacktrace:     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$27(ChunkMap.java:643) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar%2377!/:?] {}     at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$29(ChunkMap.java:634) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:bugfix.paper_chunk_patches.ChunkMapMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:bugfix.chunk_deadlock.ChunkMapLoadMixin from mod modernfix,pl:mixin:APP:fabric-networking-api-v1.mixins.json:accessor.ThreadedAnvilChunkStorageAccessor from mod fabric_networking_api_v1,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:ThreadedAnvilChunkStorageMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:lithium.mixins.json:world.player_chunk_tick.ThreadedAnvilChunkStorageMixin from mod radium,pl:mixin:APP:lithostitched.mixins.json:common.ChunkMapMixin from mod lithostitched,pl:mixin:A,pl:connector_pre_launch:A}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(ChunkTaskPriorityQueueSorter.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:classloading,pl:connector_pre_launch:A}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin} -- Wrapped in -- Details:     Wrapping exception: ~~ERROR~~ CompletionException: net.minecraft.ReportedException: Feature placement Stacktrace:     at net.minecraft.server.MinecraftServer.m_206568_(MinecraftServer.java:718) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:computing_frames,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin from mod citadel,pl:mixin:APP:connectormod.mixins.json:registries.MinecraftServerMixin from mod connectormod,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:MinecraftServerMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:fabric-resource-loader-v0.mixins.json:MinecraftServerMixin from mod fabric_resource_loader_v0,pl:mixin:APP:blueprint.mixins.json:MinecraftServerMixin from mod blueprint,pl:mixin:APP:fabric-message-api-v1.mixins.json:MinecraftServerMixin from mod fabric_message_api_v1,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:675) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:computing_frames,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin from mod citadel,pl:mixin:APP:connectormod.mixins.json:registries.MinecraftServerMixin from mod connectormod,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:MinecraftServerMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:fabric-resource-loader-v0.mixins.json:MinecraftServerMixin from mod fabric_resource_loader_v0,pl:mixin:APP:blueprint.mixins.json:MinecraftServerMixin from mod blueprint,pl:mixin:APP:fabric-message-api-v1.mixins.json:MinecraftServerMixin from mod fabric_message_api_v1,pl:mixin:A,pl:connector_pre_launch:A}     at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23269!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:computing_frames,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin from mod modernfix,pl:mixin:APP:modernfix-forge.mixins.json:core.MinecraftServerMixin from mod modernfix,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin from mod citadel,pl:mixin:APP:connectormod.mixins.json:registries.MinecraftServerMixin from mod connectormod,pl:mixin:APP:fabric-lifecycle-events-v1.mixins.json:MinecraftServerMixin from mod fabric_lifecycle_events_v1,pl:mixin:APP:fabric-resource-loader-v0.mixins.json:MinecraftServerMixin from mod fabric_resource_loader_v0,pl:mixin:APP:blueprint.mixins.json:MinecraftServerMixin from mod blueprint,pl:mixin:APP:fabric-message-api-v1.mixins.json:MinecraftServerMixin from mod fabric_message_api_v1,pl:mixin:A,pl:connector_pre_launch:A}     at java.lang.Thread.run(Thread.java:833) ~[?:?] {re:mixin} -- System Details -- Details:     Minecraft Version: 1.20.1     Minecraft Version ID: 1.20.1     Operating System: Windows 10 (amd64) version 10.0     Java Version: 17.0.7, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation     Memory: 475988768 bytes (453 MiB) / 2516582400 bytes (2400 MiB) up to 34359738368 bytes (32768 MiB)     CPUs: 32     Processor Vendor: AuthenticAMD     Processor Name: AMD Ryzen 9 9950X 16-Core Processor                 Identifier: AuthenticAMD Family 26 Model 68 Stepping 0     Microarchitecture: unknown     Frequency (GHz): 4.29     Number of physical packages: 1     Number of physical CPUs: 16     Number of logical CPUs: 32     Graphics card #0 name: NVIDIA GeForce RTX 5070 Ti     Graphics card #0 vendor: NVIDIA (0x10de)     Graphics card #0 VRAM (MB): 4095.00     Graphics card #0 deviceId: 0x2c05     Graphics card #0 versionInfo: DriverVersion=32.0.15.8097     Memory slot #0 capacity (MB): 49152.00     Memory slot #0 clockSpeed (GHz): 6.40     Memory slot #0 type: Unknown     Memory slot #1 capacity (MB): 49152.00     Memory slot #1 clockSpeed (GHz): 6.40     Memory slot #1 type: Unknown     Virtual memory max (MB): 104051.97     Virtual memory used (MB): 20980.76     Swap memory total (MB): 6144.00     Swap memory used (MB): 36.83     JVM Flags: 1 total; -Xmx32G     Server Running: true     Player Count: 0 / 20; []     Data Packs: vanilla, mod:betterdungeons, mod:fabric_renderer_api_v1, mod:netherexp, mod:playeranimator (incompatible), mod:fabric_item_api_v1, mod:illagerinvasion, mod:fabric_rendering_fluids_v1, mod:exlinecopperequipment, mod:fabric_models_v0, mod:sophisticatedcore (incompatible), mod:golemsarefriends (incompatible), mod:fabric_convention_tags_v1, mod:placebo (incompatible), mod:citadel (incompatible), mod:alexsmobs (incompatible), mod:fabric_command_api_v1, mod:fabric_block_view_api_v2, mod:fabric_command_api_v2, mod:yungsapi, mod:fabric_data_attachment_api_v1, mod:mixinextras (incompatible), mod:bookshelf, mod:sophisticatedbackpacks (incompatible), mod:guardvillagers (incompatible), mod:fabric_screen_api_v1, mod:cloth_config (incompatible), mod:fabric_api, mod:fabric_content_registries_v0, mod:geophilic, mod:jadensnetherexpansiondelight, mod:farmersdelight, mod:fabric_game_rule_api_v1, mod:fabric_api_lookup_api_v1, mod:endersdelight, mod:cataclysmiccombat, mod:lionfishapi (incompatible), mod:cataclysm (incompatible), mod:curios (incompatible), mod:connectormod, mod:fabric_entity_events_v1, mod:spartanweaponry, mod:architectury (incompatible), mod:fabric_loot_api_v2, mod:betterendisland, mod:fabric_rendering_data_attachment_v1, mod:fabric_networking_api_v1, mod:illageandspillage, mod:bettermineshafts, mod:fabric_lifecycle_events_v1, mod:fabric_key_binding_api_v1, mod:fabric_client_tags_api_v1, mod:fabric_transfer_api_v1, mod:fabric_dimensions_v1, mod:mowziesmobs, mod:geckolib, mod:endertrigon (incompatible), mod:elysium_api, mod:fabric_model_loading_api_v1, mod:mowzies_cataclysm, mod:jei, mod:lithostitched, mod:graveyard (incompatible), mod:fabric_screen_handler_api_v1, mod:fabric_resource_loader_v0, mod:caelus (incompatible), mod:obscure_api (incompatible), mod:fabric_rendering_v1, mod:fabric_renderer_indigo, mod:fastsuite (incompatible), mod:dungeonnowloading (incompatible), mod:integrated_api, mod:fabric_mining_level_api_v1, mod:fromtheshadows (incompatible), mod:crackerslib (incompatible), mod:outer_end, mod:magistuarmory (incompatible), mod:starlight (incompatible), mod:aquamirae_mod_extra_music, mod:blueprint, mod:savage_and_ravage (incompatible), mod:fabric_particles_v1, mod:puzzlesaccessapi, mod:forge, mod:fabric_transitive_access_wideners_v1, mod:nyfsspiders (incompatible), mod:tectonic (incompatible), mod:caverns_and_chasms (incompatible), mod:upgrade_aquatic (incompatible), mod:illagerwarship, mod:okzoomer (incompatible), mod:enchdesc (incompatible), mod:moonlight (incompatible), mod:fabric_api_base, mod:bettercombat (incompatible), mod:combatroll (incompatible), mod:glowingraidillagers (incompatible), mod:fabric_blockrenderlayer_v1, mod:mixinsquared (incompatible), mod:fabric_block_api_v1, mod:nethersdelight, mod:fabric_resource_conditions_api_v1, mod:spartanshields, mod:fabric_item_group_api_v1, mod:fastbench (incompatible), mod:aquacombat, mod:zeta (incompatible), mod:quark (incompatible), mod:supplementaries, mod:amendments (incompatible), mod:irons_spellbooks, mod:fabric_biome_api_v1, mod:fabric_registry_sync_v0, mod:fastfurnace (incompatible), mod:oceansdelight (incompatible), mod:alexsdelight, mod:fabric_recipe_api_v1, mod:ferritecore (incompatible), mod:fabric_object_builder_api_v1, mod:puzzleslib, mod:fabric_sound_api_v1, mod:ias_spellbooks, mod:fabric_message_api_v1, mod:fabric_data_generation_api_v1, mod:fabric_events_interaction_v0, mod:aquamirae (incompatible), tectonic/tectonic (incompatible), tectonic/tectonic/overlay.mod, alexsmobs_compat, caverns_and_chasms_compat, fabric, lithostitched/breaks_seed_parity, Supplementaries Generated Pack, mod:cupboard (incompatible), mod:modernfix (incompatible), mod:chunky (incompatible), mod:radium     Enabled Feature Flags: minecraft:vanilla     World Generation: Experimental     Is Modded: Definitely; Server brand changed to 'forge'     Type: Dedicated Server (map_server.txt)     Sinytra Connector: 1.0.0-beta.46+1.20.1         SINYTRA CONNECTOR IS PRESENT!         Please verify issues are not caused by Connector before reporting them to mod authors. If you're unsure, file a report on Connector's issue tracker.         Connector's issue tracker can be found at https://github.com/Sinytra/Connector/issues.     ModLauncher: 10.0.9+10.0.9+main.dcd20f30     ModLauncher launch target: forgeserver     ModLauncher naming: srg     ModLauncher services:          mixin-0.8.5.jar mixin PLUGINSERVICE          eventbus-6.0.5.jar eventbus PLUGINSERVICE          fmlloader-1.20.1-47.4.0.jar slf4jfixer PLUGINSERVICE          fmlloader-1.20.1-47.4.0.jar object_holder_definalize PLUGINSERVICE          fmlloader-1.20.1-47.4.0.jar runtime_enum_extender PLUGINSERVICE          fmlloader-1.20.1-47.4.0.jar capability_token_subclass PLUGINSERVICE          accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE          fmlloader-1.20.1-47.4.0.jar runtimedistcleaner PLUGINSERVICE          modlauncher-10.0.9.jar mixin TRANSFORMATIONSERVICE          modlauncher-10.0.9.jar fml TRANSFORMATIONSERVICE          modlauncher-10.0.9.jar mixin-transmogrifier TRANSFORMATIONSERVICE          modlauncher-10.0.9.jar connector_loader TRANSFORMATIONSERVICE      FML Language Providers:          [email protected]         lowcodefml@null         javafml@null     Mod List:          YungsBetterDungeons-1.20-Forge-4.0.4.jar          |YUNG's Better Dungeons        |betterdungeons                |1.20-Forge-4.0.4    |DONE      |Manifest: NOSIGNATURE         fabric-renderer-api-v1-3.2.1+cf68abbe77.jar       |Fabric Renderer API (v1)      |fabric_renderer_api_v1        |3.2.1+cf68abbe77    |DONE      |Manifest: NOSIGNATURE         Jadens-Nether-Expansion-2.3.5.jar                 |Jaden's Nether Expansion      |netherexp                     |2.3.5               |DONE      |Manifest: NOSIGNATURE         player-animation-lib-forge-1.0.2-rc1+1.20.jar     |Player Animator               |playeranimator                |1.0.2-rc1+1.20      |DONE      |Manifest: NOSIGNATURE         fabric-item-api-v1-2.1.28+4d0bbcfa77.jar          |Fabric Item API (v1)          |fabric_item_api_v1            |2.1.28+4d0bbcfa77   |DONE      |Manifest: NOSIGNATURE         IllagerInvasion-v8.0.7-1.20.1-Forge.jar           |Illager Invasion              |illagerinvasion               |8.0.7               |DONE      |Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         fabric-rendering-fluids-v1-3.0.28+4ac5e37a77.jar  |Fabric Rendering Fluids (v1)  |fabric_rendering_fluids_v1    |3.0.28+4ac5e37a77   |DONE      |Manifest: NOSIGNATURE         exlinecopperequipment-forge-1.20.1-v2.0.8.jar     |Exline's Copper Equipment     |exlinecopperequipment         |2.0.8               |DONE      |Manifest: NOSIGNATURE         fabric-models-v0-0.4.2+7c3892a477.jar             |Fabric Models (v0)            |fabric_models_v0              |0.4.2+7c3892a477    |DONE      |Manifest: NOSIGNATURE         sophisticatedcore-1.20.1-1.2.79.1066.jar          |Sophisticated Core            |sophisticatedcore             |1.2.79.1066         |DONE      |Manifest: NOSIGNATURE         golemsarefriends-1.20.0-1.0.1.jar                 |Golems Are Friends Not Fodder |golemsarefriends              |1.20.0-1.0.1        |DONE      |Manifest: NOSIGNATURE         fabric-convention-tags-v1-1.5.5+fa3d1c0177.jar    |Fabric Convention Tags        |fabric_convention_tags_v1     |1.5.5+fa3d1c0177    |DONE      |Manifest: NOSIGNATURE         Placebo-1.20.1-8.6.3.jar                          |Placebo                       |placebo                       |8.6.3               |DONE      |Manifest: NOSIGNATURE         modernfix-forge-5.24.4+mc1.20.1.jar               |ModernFix                     |modernfix                     |5.24.4+mc1.20.1     |DONE      |Manifest: NOSIGNATURE         citadel-2.6.2-1.20.1.jar                          |Citadel                       |citadel                       |2.6.2               |DONE      |Manifest: NOSIGNATURE         alexsmobs-1.22.9.jar                              |Alex's Mobs                   |alexsmobs                     |1.22.9              |DONE      |Manifest: NOSIGNATURE         fabric-command-api-v1-1.2.34+f71b366f77.jar       |Fabric Command API (v1)       |fabric_command_api_v1         |1.2.34+f71b366f77   |DONE      |Manifest: NOSIGNATURE         fabric-block-view-api-v2-1.0.1+0767707077.jar     |Fabric BlockView API (v2)     |fabric_block_view_api_v2      |1.0.1+0767707077    |DONE      |Manifest: NOSIGNATURE         fabric-command-api-v2-2.2.13+561530ec77.jar       |Fabric Command API (v2)       |fabric_command_api_v2         |2.2.13+561530ec77   |DONE      |Manifest: NOSIGNATURE         YungsApi-1.20-Forge-4.0.6.jar                     |YUNG's API                    |yungsapi                      |1.20-Forge-4.0.6    |DONE      |Manifest: NOSIGNATURE         fabric-data-attachment-api-v1-1.0.0+30ef839e77.jar|Fabric Data Attachment API (v1|fabric_data_attachment_api_v1 |1.0.0+30ef839e77    |DONE      |Manifest: NOSIGNATURE         mixinextras-forge-0.2.0-beta.7.jar                |MixinExtras                   |mixinextras                   |0.2.0-beta.7        |DONE      |Manifest: NOSIGNATURE         Bookshelf-Forge-1.20.1-20.2.13.jar                |Bookshelf                     |bookshelf                     |20.2.13             |DONE      |Manifest: eb:c4:b1:67:8b:f9:0c:db:dc:4f:01:b1:8e:61:64:39:4c:10:85:0b:a6:c4:c7:48:f0:fa:95:f2:cb:08:3a:e5         sophisticatedbackpacks-1.20.1-3.23.23.1289.jar    |Sophisticated Backpacks       |sophisticatedbackpacks        |3.23.23.1289        |DONE      |Manifest: NOSIGNATURE         guardvillagers-1.20.1-1.6.11.jar                  |Guard Villagers               |guardvillagers                |1.20.1-1.6.11       |DONE      |Manifest: NOSIGNATURE         fabric-screen-api-v1-2.0.8+45a670a577.jar         |Fabric Screen API (v1)        |fabric_screen_api_v1          |2.0.8+45a670a577    |DONE      |Manifest: NOSIGNATURE         cloth-config-11.1.136-forge.jar                   |Cloth Config v10 API          |cloth_config                  |11.1.136            |DONE      |Manifest: NOSIGNATURE         fabric-api-0.92.2+1.11.12+1.20.1.jar              |Forgified Fabric API          |fabric_api                    |0.92.2+1.11.12+1.20.|DONE      |Manifest: NOSIGNATURE         fabric-content-registries-v0-4.0.11+a670df1e77.jar|Fabric Content Registries (v0)|fabric_content_registries_v0  |4.0.11+a670df1e77   |DONE      |Manifest: NOSIGNATURE         Geophilic v3.4.2 f15-80.mod.jar                   |Geophilic                     |geophilic                     |3.4.2               |DONE      |Manifest: NOSIGNATURE         jadensnetherexpansiondelight-1.0.3-1.20.1-forge.ja|Jaden's Nether Expansion Delig|jadensnetherexpansiondelight  |1.0.3-1.20.1-forge  |DONE      |Manifest: NOSIGNATURE         FarmersDelight-1.20.1-1.2.8.jar                   |Farmer's Delight              |farmersdelight                |1.20.1-1.2.8        |DONE      |Manifest: NOSIGNATURE         fabric-game-rule-api-v1-1.0.40+683d4da877.jar     |Fabric Game Rule API (v1)     |fabric_game_rule_api_v1       |1.0.40+683d4da877   |DONE      |Manifest: NOSIGNATURE         fabric-api-lookup-api-v1-1.6.36+67f9824077.jar    |Fabric API Lookup API (v1)    |fabric_api_lookup_api_v1      |1.6.36+67f9824077   |DONE      |Manifest: NOSIGNATURE         endersdelight-forge-1.20.1-1.1.3.jar              |Ender's Delight               |endersdelight                 |1.1.3               |DONE      |Manifest: NOSIGNATURE         cataclysmiccombat-1.4.1-1.20.1.jar                |Cataclysmic Combat            |cataclysmiccombat             |1.4                 |DONE      |Manifest: NOSIGNATURE         Chunky-1.3.146.jar                                |Chunky                        |chunky                        |1.3.146             |DONE      |Manifest: NOSIGNATURE         lionfishapi-2.4.jar                               |LionfishAPI                   |lionfishapi                   |2.4                 |DONE      |Manifest: NOSIGNATURE         L_Enders_Cataclysm-3.15.jar                       |cataclysm                     |cataclysm                     |3.15                |DONE      |Manifest: NOSIGNATURE         curios-forge-5.14.1+1.20.1.jar                    |Curios API                    |curios                        |5.14.1+1.20.1       |DONE      |Manifest: NOSIGNATURE         Connector-1.0.0-beta.46+1.20.1-mod.jar            |Connector                     |connectormod                  |1.0.0-beta.46+1.20.1|DONE      |Manifest: NOSIGNATURE         fabric-entity-events-v1-1.6.0+4ca7515277.jar      |Fabric Entity Events (v1)     |fabric_entity_events_v1       |1.6.0+4ca7515277    |DONE      |Manifest: NOSIGNATURE         SpartanWeaponry-1.20.1-forge-3.2.1-all.jar        |Spartan Weaponry              |spartanweaponry               |3.2.1               |DONE      |Manifest: NOSIGNATURE         architectury-9.2.14-forge.jar                     |Architectury                  |architectury                  |9.2.14              |DONE      |Manifest: NOSIGNATURE         fabric-loot-api-v2-1.2.1+eb28f93e77.jar           |Fabric Loot API (v2)          |fabric_loot_api_v2            |1.2.1+eb28f93e77    |DONE      |Manifest: NOSIGNATURE         cupboard-1.20.1-2.7.jar                           |Cupboard utilities            |cupboard                      |1.20.1-2.7          |DONE      |Manifest: NOSIGNATURE         YungsBetterEndIsland-1.20-Forge-2.0.6.jar         |YUNG's Better End Island      |betterendisland               |1.20-Forge-2.0.6    |DONE      |Manifest: NOSIGNATURE         fabric-rendering-data-attachment-v1-0.3.37+a6081af|Fabric Rendering Data Attachme|fabric_rendering_data_attachme|0.3.37+a6081afc77   |DONE      |Manifest: NOSIGNATURE         fabric-networking-api-v1-1.3.11+503a202477.jar    |Fabric Networking API (v1)    |fabric_networking_api_v1      |1.3.11+503a202477   |DONE      |Manifest: NOSIGNATURE         illageandspillagerespillaged-1.2.8.jar            |Illage and Spillage: Respillag|illageandspillage             |1.2.8               |DONE      |Manifest: NOSIGNATURE         YungsBetterMineshafts-1.20-Forge-4.0.4.jar        |YUNG's Better Mineshafts      |bettermineshafts              |1.20-Forge-4.0.4    |DONE      |Manifest: NOSIGNATURE         fabric-lifecycle-events-v1-2.2.22+afab492177.jar  |Fabric Lifecycle Events (v1)  |fabric_lifecycle_events_v1    |2.2.22+afab492177   |DONE      |Manifest: NOSIGNATURE         fabric-key-binding-api-v1-1.0.37+561530ec77.jar   |Fabric Key Binding API (v1)   |fabric_key_binding_api_v1     |1.0.37+561530ec77   |DONE      |Manifest: NOSIGNATURE         fabric-client-tags-api-v1-1.1.2+5d6761b877.jar    |Fabric Client Tags            |fabric_client_tags_api_v1     |1.1.2+5d6761b877    |DONE      |Manifest: NOSIGNATURE         fabric-transfer-api-v1-3.3.5+631c9cd677.jar       |Fabric Transfer API (v1)      |fabric_transfer_api_v1        |3.3.5+631c9cd677    |DONE      |Manifest: NOSIGNATURE         fabric-dimensions-v1-2.1.54+8005d10d77.jar        |Fabric Dimensions API (v1)    |fabric_dimensions_v1          |2.1.54+8005d10d77   |DONE      |Manifest: NOSIGNATURE         radium-mc1.20.1-0.12.4+git.26c9d8e.jar            |Radium                        |radium                        |0.12.4+git.26c9d8e  |DONE      |Manifest: NOSIGNATURE         mowziesmobs-1.7.3.jar                             |Mowzie's Mobs                 |mowziesmobs                   |1.7.3               |DONE      |Manifest: NOSIGNATURE         geckolib-forge-1.20.1-4.7.3.jar                   |GeckoLib 4                    |geckolib                      |4.7.3               |DONE      |Manifest: NOSIGNATURE         endertrigon-1.20.1-1.1-all.jar                    |Ender Trigon                  |endertrigon                   |1.20.1-1.1          |DONE      |Manifest: NOSIGNATURE         ElysiumAPI-1.20.1-1.1.3.jar                       |Elysium                       |elysium_api                   |1.1.3               |DONE      |Manifest: NOSIGNATURE         fabric-model-loading-api-v1-1.0.3+6274ab9d77.jar  |Fabric Model Loading API (v1) |fabric_model_loading_api_v1   |1.0.3+6274ab9d77    |DONE      |Manifest: NOSIGNATURE         mowzies_cataclysm-1.2.0.jar                       |Mowzie's Cataclysm            |mowzies_cataclysm             |1.2.0               |DONE      |Manifest: NOSIGNATURE         jei-1.20.1-forge-15.20.0.112.jar                  |Just Enough Items             |jei                           |15.20.0.112         |DONE      |Manifest: NOSIGNATURE         lithostitched-forge-1.20.1-1.4.11.jar             |Lithostitched                 |lithostitched                 |1.4.11              |DONE      |Manifest: NOSIGNATURE         The_Graveyard_3.1_(FORGE)_for_1.20.1.jar          |The Graveyard                 |graveyard                     |3.1                 |DONE      |Manifest: NOSIGNATURE         fabric-screen-handler-api-v1-1.3.30+561530ec77.jar|Fabric Screen Handler API (v1)|fabric_screen_handler_api_v1  |1.3.30+561530ec77   |DONE      |Manifest: NOSIGNATURE         fabric-resource-loader-v0-0.11.10+bcd08ed377.jar  |Fabric Resource Loader (v0)   |fabric_resource_loader_v0     |0.11.10+bcd08ed377  |DONE      |Manifest: NOSIGNATURE         caelus-forge-3.2.0+1.20.1.jar                     |Caelus API                    |caelus                        |3.2.0+1.20.1        |DONE      |Manifest: NOSIGNATURE         obscure_api-15.jar                                |Obscure API                   |obscure_api                   |15                  |DONE      |Manifest: NOSIGNATURE         fabric-rendering-v1-3.0.8+66e9a48f77.jar          |Fabric Rendering (v1)         |fabric_rendering_v1           |3.0.8+66e9a48f77    |DONE      |Manifest: NOSIGNATURE         fabric-renderer-indigo-1.5.2+b5b2da4177.jar       |Fabric Renderer - Indigo      |fabric_renderer_indigo        |1.5.2+b5b2da4177    |DONE      |Manifest: NOSIGNATURE         FastSuite-1.20.1-5.1.0.jar                        |Fast Suite                    |fastsuite                     |5.1.0               |DONE      |Manifest: NOSIGNATURE         Dungeon Now Loading-forge-1.20.1-1.5.jar          |Dungeon Now Loading           |dungeonnowloading             |1.5                 |DONE      |Manifest: NOSIGNATURE         integrated_api-1.5.3+1.20.1-forge.jar             |Integrated API                |integrated_api                |1.5.3+1.20.1-forge  |DONE      |Manifest: NOSIGNATURE         fabric-mining-level-api-v1-2.1.50+561530ec77.jar  |Fabric Mining Level API (v1)  |fabric_mining_level_api_v1    |2.1.50+561530ec77   |DONE      |Manifest: NOSIGNATURE         fromtheshadowsreborn-2.8.jar                      |From the Shadows Reborn       |fromtheshadows                |2.8                 |DONE      |Manifest: NOSIGNATURE         crackerslib-forge-1.20.1-0.3.2.1.jar              |CrackersLib                   |crackerslib                   |1.20.1-0.3.2.1      |DONE      |Manifest: NOSIGNATURE         TheOuterEnd-1.0.10.jar                            |The Outer End                 |outer_end                     |1.0.8               |DONE      |Manifest: NOSIGNATURE         [1.20.1-forge]-Epic-Knights-9.23.jar              |Epic Knights Mod              |magistuarmory                 |9.23                |DONE      |Manifest: NOSIGNATURE         starlight-1.1.2+forge.1cda73c.jar                 |Starlight                     |starlight                     |1.1.2+forge.1cda73c |DONE      |Manifest: NOSIGNATURE         Aquamirae Mod Boss Music Tweaks 1.20.1 v1.1.0.jar |Aquamirae Mod EXTRA Music     |aquamirae_mod_extra_music     |1.0.0               |DONE      |Manifest: NOSIGNATURE         blueprint-1.20.1-7.1.3.jar                        |Blueprint                     |blueprint                     |7.1.3               |DONE      |Manifest: NOSIGNATURE         savage_and_ravage-1.20.1-6.0.0.jar                |Savage & Ravage               |savage_and_ravage             |6.0.0               |DONE      |Manifest: NOSIGNATURE         fabric-particles-v1-1.1.2+78e1ecb877.jar          |Fabric Particles (v1)         |fabric_particles_v1           |1.1.2+78e1ecb877    |DONE      |Manifest: NOSIGNATURE         puzzlesaccessapi-forge-20.1.1.jar                 |Puzzles Access Api            |puzzlesaccessapi              |20.1.1              |DONE      |Manifest: NOSIGNATURE         forge-1.20.1-47.4.0-universal.jar                 |Forge                         |forge                         |47.4.0              |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90         fabric-transitive-access-wideners-v1-4.3.1+1880499|Fabric Transitive Access Widen|fabric_transitive_access_widen|4.3.1+1880499877    |DONE      |Manifest: NOSIGNATURE         nyfsspiders-forge-1.20.1-2.1.1.jar                |Nyf's Spiders                 |nyfsspiders                   |2.1.1               |DONE      |Manifest: NOSIGNATURE         tectonic-3.0.6-forge-1.20.1.jar                   |Tectonic                      |tectonic                      |3.0.6               |DONE      |Manifest: NOSIGNATURE         server-1.20.1-20230612.114412-srg.jar             |Minecraft                     |minecraft                     |1.20.1              |DONE      |Manifest: NOSIGNATURE         caverns_and_chasms-1.20.1-2.0.0.jar               |Caverns & Chasms              |caverns_and_chasms            |2.0.0               |DONE      |Manifest: NOSIGNATURE         upgrade_aquatic-1.20.1-6.0.3.jar                  |Upgrade Aquatic               |upgrade_aquatic               |6.0.3               |DONE      |Manifest: NOSIGNATURE         illagerwarship-1.0.1-forge-1.20.1.jar             |Illager-Warship               |illagerwarship                |1.0.1               |DONE      |Manifest: NOSIGNATURE         okzoomer-forge-1.20-3.0.1.jar                     |OkZoomer                      |okzoomer                      |3.0.1               |DONE      |Manifest: NOSIGNATURE         EnchantmentDescriptions-Forge-1.20.1-17.1.19.jar  |EnchantmentDescriptions       |enchdesc                      |17.1.19             |DONE      |Manifest: eb:c4:b1:67:8b:f9:0c:db:dc:4f:01:b1:8e:61:64:39:4c:10:85:0b:a6:c4:c7:48:f0:fa:95:f2:cb:08:3a:e5         moonlight-1.20-2.15.6-forge.jar                   |Moonlight Library             |moonlight                     |1.20-2.15.6         |DONE      |Manifest: NOSIGNATURE         fabric-api-base-0.4.31+ef105b4977.jar             |Fabric API Base               |fabric_api_base               |0.4.31+ef105b4977   |DONE      |Manifest: NOSIGNATURE         bettercombat-forge-1.8.6+1.20.1.jar               |Better Combat                 |bettercombat                  |1.8.6+1.20.1        |DONE      |Manifest: NOSIGNATURE         combatroll-forge-1.3.3+1.20.1.jar                 |Combat Roll                   |combatroll                    |1.3.3+1.20.1        |DONE      |Manifest: NOSIGNATURE         glowingraidillagers-1.20-1.20.1-1.0.0.jar         |GlowingRaidIllagers           |glowingraidillagers           |1.0.0               |DONE      |Manifest: NOSIGNATURE         fabric-blockrenderlayer-v1-1.1.41+1d0da21e77.jar  |Fabric BlockRenderLayer Regist|fabric_blockrenderlayer_v1    |1.1.41+1d0da21e77   |DONE      |Manifest: NOSIGNATURE         mixinsquared-forge-0.1.1.jar                      |MixinSquared                  |mixinsquared                  |0.1.1               |DONE      |Manifest: NOSIGNATURE         fabric-block-api-v1-1.0.11+0e6cb7f777.jar         |Fabric Block API (v1)         |fabric_block_api_v1           |1.0.11+0e6cb7f777   |DONE      |Manifest: NOSIGNATURE         nethersdelight-1.20.1-4.0.jar                     |Nether's Delight              |nethersdelight                |1.20.1-4.0          |DONE      |Manifest: NOSIGNATURE         fabric-resource-conditions-api-v1-2.3.8+9e342fc177|Fabric Resource Conditions API|fabric_resource_conditions_api|2.3.8+9e342fc177    |DONE      |Manifest: NOSIGNATURE         SpartanShields-1.20.1-forge-3.1.1.jar             |Spartan Shields               |spartanshields                |3.1.1               |DONE      |Manifest: NOSIGNATURE         fabric-item-group-api-v1-4.0.12+c9161c2d77.jar    |Fabric Item Group API (v1)    |fabric_item_group_api_v1      |4.0.12+c9161c2d77   |DONE      |Manifest: NOSIGNATURE         FastWorkbench-1.20.1-8.0.4.jar                    |Fast Workbench                |fastbench                     |8.0.4               |DONE      |Manifest: NOSIGNATURE         aquacombat 1.2.jar                                |Aqua combat                   |aquacombat                    |1.2                 |DONE      |Manifest: NOSIGNATURE         Zeta-1.0-30.jar                                   |Zeta                          |zeta                          |1.0-30              |DONE      |Manifest: NOSIGNATURE         Quark-4.0-462.jar                                 |Quark                         |quark                         |4.0-462             |DONE      |Manifest: NOSIGNATURE         supplementaries-1.20-3.1.36.jar                   |Supplementaries               |supplementaries               |1.20-3.1.36         |DONE      |Manifest: NOSIGNATURE         amendments-1.20-2.0.3.jar                         |Amendments                    |amendments                    |1.20-2.0.3          |DONE      |Manifest: NOSIGNATURE         irons_spellbooks-1.20.1-3.4.0.10.jar              |Iron's Spells 'n Spellbooks   |irons_spellbooks              |1.20.1-3.4.0.10     |DONE      |Manifest: NOSIGNATURE         fabric-biome-api-v1-13.0.13+dc36698e77.jar        |Fabric Biome API (v1)         |fabric_biome_api_v1           |13.0.13+dc36698e77  |DONE      |Manifest: NOSIGNATURE         fabric-registry-sync-v0-2.3.3+1c0ea72177.jar      |Fabric Registry Sync (v0)     |fabric_registry_sync_v0       |2.3.3+1c0ea72177    |DONE      |Manifest: NOSIGNATURE         FastFurnace-1.20.1-8.0.2.jar                      |FastFurnace                   |fastfurnace                   |8.0.2               |DONE      |Manifest: NOSIGNATURE         oceansdelight-1.0.2-1.20.jar                      |Ocean's Delight               |oceansdelight                 |1.0.2-1.20          |DONE      |Manifest: NOSIGNATURE         alexsdelight-1.5.jar                              |Alex's Delight                |alexsdelight                  |1.5                 |DONE      |Manifest: NOSIGNATURE         fabric-recipe-api-v1-1.0.21+514a076577.jar        |Fabric Recipe API (v1)        |fabric_recipe_api_v1          |1.0.21+514a076577   |DONE      |Manifest: NOSIGNATURE         ferritecore-6.0.1-forge.jar                       |Ferrite Core                  |ferritecore                   |6.0.1               |DONE      |Manifest: 41:ce:50:66:d1:a0:05:ce:a1:0e:02:85:9b:46:64:e0:bf:2e:cf:60:30:9a:fe:0c:27:e0:63:66:9a:84:ce:8a         fabric-object-builder-api-v1-11.1.3+4bd998fa77.jar|Fabric Object Builder API (v1)|fabric_object_builder_api_v1  |11.1.3+4bd998fa77   |DONE      |Manifest: NOSIGNATURE         PuzzlesLib-v8.1.32-1.20.1-Forge.jar               |Puzzles Lib                   |puzzleslib                    |8.1.32              |DONE      |Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         fabric-sound-api-v1-1.0.13+4f23bd8477.jar         |Fabric Sound API (v1)         |fabric_sound_api_v1           |1.0.13+4f23bd8477   |DONE      |Manifest: NOSIGNATURE         illage-and-spell-age-0.5.0-1.20.1.jar             |Illage and Spell-age          |ias_spellbooks                |0.5.0-1.20.1        |DONE      |Manifest: NOSIGNATURE         fabric-message-api-v1-5.1.9+52cc178c77.jar        |Fabric Message API (v1)       |fabric_message_api_v1         |5.1.9+52cc178c77    |DONE      |Manifest: NOSIGNATURE         fabric-data-generation-api-v1-12.3.4+369cb3a477.ja|Fabric Data Generation API (v1|fabric_data_generation_api_v1 |12.3.4+369cb3a477   |DONE      |Manifest: NOSIGNATURE         fabric-events-interaction-v0-0.6.2+0d0bd5a777.jar |Fabric Events Interaction (v0)|fabric_events_interaction_v0  |0.6.2+0d0bd5a777    |DONE      |Manifest: NOSIGNATURE         aquamirae-6.API15.jar                             |Aquamirae                     |aquamirae                     |6.API15             |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: 1bafdbcd-c29f-499e-a272-e920f6f303c3     FML: 47.4     Forge: net.minecraftforge:47.4.0  
  • Topics

×
×
  • Create New...

Important Information

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