Jump to content

[1.7.10] NBT persistent saving issue - adding additional player data


Thornack

Recommended Posts

Hi everyone,

 

So I have a class that implements IExtendedEntityProperties which I use to give the player a party of entities. I want the party members to be selectable at a later time so that the player can select whichever party member he chooses. Currently my entities get saved to the party slot but when the player dies or logs off and then logs back on the party member data doesnt persist. Im not sure what the problem is. This is my class. If you have any questions let me know, and any help is appreciated.

 

My PlayerParty class

 

 

public class PlayerParty implements IExtendedEntityProperties {

protected EntityPlayer entityPlayer;
    
public static final int NUM_SLOTS = 6;
private static final String EXTENDED_ENTITY_PROPERTIES_TAGNAME = "PlayerParty";

protected NBTTagCompound[] partyNbt = new NBTTagCompound[NUM_SLOTS];

public PlayerParty(EntityPlayer player) {
	this.entityPlayer = player;
}

//sets the party member in the specified slot. Stores only the NBT data, which is enough to recreate the party member later.
public void setPartyMember(int slot, EntityPartyMember partyMember){
	NBTTagCompound compound = new NBTTagCompound();
	partyMember.writeToNBT(compound);
	partyNbt[slot] = compound; 
	System.out.println("partyMember added to party " + partyNbt[slot]);
}

//returns true if the player has a free party slot
public boolean hasFreeSlot(){
	return (this.getNextFreeSlot() >= 0);
}

//gets the first free slot in the player's party. The NBT tag compound that slot position should
//be null if the slot is free.
public int getNextFreeSlot(){
	for(int i = 0; i < NUM_SLOTS; i++){
		if(this.partyNbt[i] == null)
			return i;
	}
	return -1;
}

public NBTTagCompound getPartyMember(int slot){
	return partyNbt[slot];
}


/**
 * Used to register these extended properties for the player during EntityConstructing event
 */
public static final void register(EntityPlayer player) {
	player.registerExtendedProperties(EXTENDED_ENTITY_PROPERTIES_TAGNAME, new PlayerParty(player));
}

/**
 * Copies additional player data from the given BattleMobExtendedPlayerHelper instance
 * Avoids NBT disk I/O overhead when cloning a player after respawn
 */
public void copy(PlayerParty properties) {
	}

/**
 * Returns BattleMobExtendedPlayerHelper properties for player
 */
public static final PlayerParty get(EntityPlayer player) {
	return (PlayerParty) player.getExtendedProperties(EXTENDED_ENTITY_PROPERTIES_TAGNAME);
}



@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = new NBTTagCompound();
	for(int i=0; i < NUM_SLOTS; i++){
		if(partyNbt[i] != null){
			compound.setTag("Slot"+i, partyNbt[i]);
		}
	}
	compound.setTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME, properties);
}

@Override
public void loadNBTData(NBTTagCompound compound) {

	NBTTagCompound properties = compound.getCompoundTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME);
	if(properties != null){
		for(int i=0; i < NUM_SLOTS; i++){
			if(properties.hasKey("Slot"+i)){
				partyNbt[i] = properties.getCompoundTag("Slot"+i);
			}
		}
	}
}

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

}

}

 

 

I use this method elsewhere to get the party members (it works)

 

 

public void tryToAddMobToParty(){
	PlayerParty pp = PlayerParty.get(Minecraft.getMinecraft().thePlayer);
	System.out.println("free slot? " + pp.hasFreeSlot());
	if(pp.hasFreeSlot() == true){
	pp.setPartyMember(pp.getNextFreeSlot(), this.hitEntity);	
	System.out.println(this.hitEntity + " saved to slot " + pp.getNextFreeSlot());
	}else{
		this.displayChatMessage(EnumChatFormatting.RED + "Your Party Is Currently Full!");
		System.out.println("next free slot " + pp.getNextFreeSlot());//should return -1 at this point because party is full [works]
		pp.getPartyMember(0);
		System.out.println("first in party " + pp.getPartyMember(0));
		pp.getPartyMember(1);
		System.out.println("second in party " + pp.getPartyMember(1));
		pp.getPartyMember(2);
		System.out.println("thirdt in party " + pp.getPartyMember(2));
		pp.getPartyMember(3);
		System.out.println("fourth in party " + pp.getPartyMember(3));
		pp.getPartyMember(4);
		System.out.println("fifth in party " + pp.getPartyMember(4));
		pp.getPartyMember(5);
		System.out.println("sixth in party " + pp.getPartyMember(5));
	}
}

 

 

 

Link to comment
Share on other sites

Oh god, please!

I see this every other time someone uses IEEP. At runtime, NBT does not matter. Represent your data properly, if you have an int, make an int field, not a field holding an NBTTagInt.

Yes, eventually you will save to NBT. But that does not mean you have to stuff your data into NBT all the time. NBT is only for saving to disk. Only only only. Nothing else.

 

To which are you referring to im sorry I dont quite understand your comment

Link to comment
Share on other sites

I guess my problem is that I need an array of "slots" that can store entity data, where each slot stores all of the information about the entity that was assigned to the slot.

That's kind of diesieben's point - each entity already has all of that data, why make it again when you can just make a reference to that entity?

 

That last part is the main point: don't store an NBT tag when you can store an actual value, e.g. the entity reference, integer, or whatever else.

 

Anyway, see here for further information on persisting IEEP data through death and dismemberment.

Link to comment
Share on other sites

Does anyone know of a way to save a stable reference to the entity so that it is easy to get the entity at a later date whenever i want? i tried getEntityById but the id changes since it is not a UUID. Im not sure how to get the entity from the UUID, and am not aware of any other good references to entities.

Link to comment
Share on other sites

Does anyone know of a way to save a stable reference to the entity so that it is easy to get the entity at a later date whenever i want? i tried getEntityById but the id changes since it is not a UUID. Im not sure how to get the entity from the UUID, and am not aware of any other good references to entities.

For players, uuid is always and everywhere the same, get uuid and get player:

UUID uuid = EntityPlayer.func_146094_a(player.getGameProfile());
EntityPlayer p = world.func_152378_a(uuid);

For entities:

entity.getUniqueID() or entity.getPersistentID()

For entity getters, you will need to loop through loaded entities and check if uuid matches...

Link to comment
Share on other sites

Yes I know all of that but my party involves entities not players... hence my problem, to note, The entities in my party get impacted by an entity that is thrown by the player whereupon they get saved to NBT and set to dead in the world and their NBT data is transferred to the impact entity and then to a holder entity that allows animations to play and then if animations are successful the NBT is transferred to an itemstack and the holder entity is set to dead and the itemstack then acts like a spawn/despawn egg. The UUID's persist throughout this process oh and the itemstack can spawn another impact entity to get the "tamed" entity  to spawn/despawn it at the will of a player. I want the entity that is captured to join the players party at the first time it is caught and to remain in teh party throughout any subsequent spawn/despawns.

 

This is why I tried to create a party where the slots are NBT Tag Compounds that are saved to the player to give him easy access to the party members so that the player can switch places with the party members easily. But I guess that is not proper, so I am looking for a solution to achieve this result. I got it figured out to the point where I can get the switching to work but the party doesnt persist through player death or log off

Link to comment
Share on other sites

BTW I know how to get the UUID I dont know how to get the entity from the UUID - basically not sure how to say the following in code "Hey server I want to get this entity from UUID ashfjws23857tiodjswufy847390ri and all associated properties including health, position, extra stats ive given my entity etc etc.."

 

[NOTE] - the UUID's are different and unpredictable depending on which entity the player captures and the player will be able to swap out party members for different ones so the solution im looking for needs to be able to account for that hence why I thought the NBT approach I posted above would work.

Link to comment
Share on other sites

BTW I know how to get the UUID I dont know how to get the entity from the UUID - basically not sure how to say the following in code "Hey server I want to get this entity from UUID ashfjws23857tiodjswufy847390ri and all associated properties including health, position, extra stats ive given my entity etc etc.."

 

[NOTE] - the UUID's are different and unpredictable depending on which entity the player captures and the player will be able to swap out party members for different ones so the solution im looking for needs to be able to account for that hence why I thought the NBT approach I posted above would work.

To get entity from uuid, loop through world entities and check uuid match...

Link to comment
Share on other sites

Does anyone know of a way to save a stable reference to the entity so that it is easy to get the entity at a later date whenever i want? i tried getEntityById but the id changes since it is not a UUID. Im not sure how to get the entity from the UUID, and am not aware of any other good references to entities.

For players, uuid is always and everywhere the same, get uuid and get player:

UUID uuid = EntityPlayer.func_146094_a(player.getGameProfile());
EntityPlayer p = world.func_152378_a(uuid);

For entities:

entity.getUniqueID() or entity.getPersistentID()

For entity getters, you will need to loop through loaded entities and check if uuid matches...

 

I'll just point out that this doesn't work for servers that are in Offline mode, because it doesn't retrieve UUIDs from Mojang.

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291999-unique-artifacts-powerful-randomly-generated-items?comment=1408

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

 

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

 

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

Link to comment
Share on other sites

Which is a real, serious issue that even Mojang suffers from.

The Game should never ever just give the player a random UUID. If you have no internet connection and the launcher has no cached UUID available, the Game must not let you in! But the launcher does it, which can corrupt worlds (in vanilla Wolves forget their owner for example).

 

I've seen this when the dedicated server is in offline mode and a client connects.  There's an internet connection, but the server (having the server.properties file say that it's offline) just doesn't fetch the UUIDs.  Keybounce has his server set up that way so that for storytelling purposes he can do name-changes and have "NPCs" for a Youtube series he's doing.  The official name-change service is not sufficient (requiring a 30 day wait between changes!)

 

That is: the client sends a valid UUID that Mojang recognizes, but the server can't find a player with that UUID.

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

 

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

 

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

Link to comment
Share on other sites

BTW I know how to get the UUID I dont know how to get the entity from the UUID - basically not sure how to say the following in code "Hey server I want to get this entity from UUID ashfjws23857tiodjswufy847390ri and all associated properties including health, position, extra stats ive given my entity etc etc.."

 

[NOTE] - the UUID's are different and unpredictable depending on which entity the player captures and the player will be able to swap out party members for different ones so the solution im looking for needs to be able to account for that hence why I thought the NBT approach I posted above would work.

To get entity from uuid, loop through world entities and check uuid match...

 

isnt looping through the entire world entities list very messy and intensive? wouldn't that cause lag? I need a fairly clean solution, some way to give the player access to my custom entities and all of their data easily since my spawn/despawn/spawn again / despawn again ...etc process will happen frequently and I need to be able to have the data each time it happens and it needs to be persistent. My entities will have stats that change over time and the player will be able to become each entity in his/her party and in order for that to work I need to be able to get the entities in a robust and not very intensive way so that the process doesnt cause crazy lag cause if this is occurring in a multiplayer, it probably isnt good to have several players looping through the entire entities list every time they want to change whomever they are in their party.

 

Especially because the player holds the entity they want in the form of an item... where that itemstack contains all of the desired entities NBT data

Link to comment
Share on other sites

Ok so I found something really weird

 

If I add a variable called test that is an int to my class

public class PlayerParty implements IExtendedEntityProperties {

protected EntityPlayer entityPlayer;
        public int test = 0;
public static final int NUM_SLOTS = 6;
//.....the rest of the class
}

 

then inside my setParty Member Method I do test = 100 as seen in the method below and outprint the value of test when the method is called I get

[server thread/INFO] [sTDOUT]: [custommod.player.properties.PlayerParty:setPartyMember:28]: setting test to100 //this is as expected

public void setPartyMember(int slot, EntityPartyMember partyMember){
	NBTTagCompound compound = new NBTTagCompound();
	partyMember.writeToNBT(compound);
	partyNbt[slot] = compound; 
                test = 100;
                System.out.println("setting test to" + test);
	System.out.println("partyMember added to party " + partyNbt[slot]);
}

 

then if I put a system.outprint line to get the value of test when NBT data gets saved I get the following

 

[server thread/INFO] [sTDOUT]: [custommod.player.properties.PlayerParty:saveNBTData:80]: test equals 0 //this is the problem...why would it be 0? when I just set it to be 100!

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = new NBTTagCompound();
	for(int i=0; i < NUM_SLOTS; i++){
                System.out.println("test equals " + test);
		if(partyNbt[i] != null){
			compound.setTag("Slot"+i, partyNbt[i]);
		}
	}
	compound.setTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME, properties);
}

 

Does anyone know why?

Link to comment
Share on other sites

So basically, my method setPartyMember gets called server side, at which point the variable test is set to be 100. I do not call any other method to reset test to 0 but for some reason it is 0 when saveNBTData is called... I have no idea why...

 

*Note to force the saveNBTData method to be called hit the escape key to bring up the log off menu

Link to comment
Share on other sites

Look at your saving code. ;p

 

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = new NBTTagCompound();
	for(int i=0; i < NUM_SLOTS; i++){
                System.out.println("test equals " + test);
		if(partyNbt[i] != null){
			properties.setTag("Slot"+i, partyNbt[i]);
		}
	}
	compound.setTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME, properties);
}

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Is it because when I get the instance of my party class I am passing in the client player using

 

PlayernParty ppp = PlayerParty.get(Minecraft.getMinecraft().thePlayer);

 

but I am calling my setPartyMember code server side and as such only the client player is updated and not the server player? is that what is going on and does the saveNBTData method work only from server player?

 

public void setPartyMember(int slot, EntityPartyMember partyMember){
	NBTTagCompound compound = new NBTTagCompound();
	partyMember.writeToNBT(compound);
	partyNbt[slot] = compound; 
                test = 100;
                System.out.println("setting test to" + test);
	System.out.println("partyMember added to party " + partyNbt[slot]);
}

Link to comment
Share on other sites

Also, The reason why I cannot simply just save a reference to my entity is because the entity only exists inside my itemstack and does not exist in the world. So I need to be able to save the entity NBT to the players extended properties in order to get its data.

Link to comment
Share on other sites

Also, I have a bit of a problem I think. I need to call this method on server but I need to have the client player. I am not sure how to get the client player while also calling the method on the server without doing PlayerParty pp = PlayerParty.get(Minecraft.getMinecraft().thePlayer); - I think this may be causing the weird problems where I need packets.

public void tryToAddMobToParty(){
	PlayerParty pp = PlayerParty.get(Minecraft.getMinecraft().thePlayer);
	System.out.println("free slot? " + pp.hasFreeSlot());
	if(pp.hasFreeSlot() == true){
	pp.setPartyMember(pp.getNextFreeSlot(), this.hitEntity);	
	System.out.println(this.hitEntity + " saved to slot " + pp.getNextFreeSlot());
	}else{
		this.displayChatMessage(EnumChatFormatting.RED + "Your Party Is Currently Full!");
		System.out.println("next free slot " + pp.getNextFreeSlot());//should return -1 at this point because party is full [works]
		pp.getPartyMember(0);
		System.out.println("first in party " + pp.getPartyMember(0));
		pp.getPartyMember(1);
		System.out.println("second in party " + pp.getPartyMember(1));
		pp.getPartyMember(2);
		System.out.println("thirdt in party " + pp.getPartyMember(2));
		pp.getPartyMember(3);
		System.out.println("fourth in party " + pp.getPartyMember(3));
		pp.getPartyMember(4);
		System.out.println("fifth in party " + pp.getPartyMember(4));
		pp.getPartyMember(5);
		System.out.println("sixth in party " + pp.getPartyMember(5));
	}
}

Link to comment
Share on other sites

Thornack, srsly bro - past your whole code that is used by IEEP. If you don't know where the problem is, how can you expect others to find it without your full code. Aside from the fact mentioned above (diesiben), when I pointed out your saving method - you made typo.

 

You:

@Override
public void saveNBTData(NBTTagCompound compound) {
	NBTTagCompound properties = new NBTTagCompound();
	for(int i=0; i < NUM_SLOTS; i++){
                System.out.println("test equals " + test);
		if(partyNbt[i] != null){
			compound.setTag("Slot"+i, partyNbt[i]);
		}
	}
	compound.setTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME, properties);
}

Me: (compound parameter is the full NBT of given player, you shouldnt save data directly there, so I belive it's a typo)

@Override

public void saveNBTData(NBTTagCompound compound) {

NBTTagCompound properties = new NBTTagCompound();

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

                System.out.println("test equals " + test);

if(partyNbt != null){

properties.setTag("Slot"+i, partyNbt);

}

}

compound.setTag(EXTENDED_ENTITY_PROPERTIES_TAGNAME, properties);

}

 

If you care for my opinion - your design is NOT good. Many here would probably help you do better (suggestions), but you would need to post full code as picking parts that YOU THINK don't work doesn't mean that those are only ones that are badly written.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

So pokemon it is. :P Few things 1st:

- Why are you saving entity to both ItemStack and player?

- Will this caught entity always be your custom made one (EntityCustom), following that - consider using EntityLivingBase && !EntityPlayer.

- What is EntityPartyMember - my guess it's an interface, but how do you use it?

 

Now to problems:

Many pointed out- you can't use Minecraft.class on server. How to fix it? By passing args.

Your #onEntityCaught() is called from The Holder that has the entity it is catching and has the catcher who want to catch it. Change it to #onEntityCaught(EntityPlayer catcher, EntityCustom entityCaught), you will need to pass them and then do same with #tryToAddMobToParty() -> #tryToAddMobToParty(EntityPlayer catcher, EntityCustom entityCaught).

That way you will now be able to:

PlayerParty pp = PlayerParty.get(catcher);

 

I don't quite know where those methods are palced (example: pp.setPartyMember(pp.getNextFreeSlot(), this.hitEntity); seems like being inside holder/projectile, which mean you can access it faster) but you probably get what I mean.

 

I am sometimes bored (I really am) so if you want insight help call me Skype: ernio333

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

So pokemon it is. :P Few things 1st:

- Why are you saving entity to both ItemStack and player?

- Will this caught entity always be your custom made one (EntityCustom), following that - consider using EntityLivingBase && !EntityPlayer.

- What is EntityPartyMember - my guess it's an interface, but how do you use it?

 

Now to problems:

Many pointed out- you can't use Minecraft.class on server. How to fix it? By passing args.

Your #onEntityCaught() is called from The Holder that has the entity it is catching and has the catcher who want to catch it. Change it to #onEntityCaught(EntityPlayer catcher, EntityCustom entityCaught), you will need to pass them and then do same with #tryToAddMobToParty() -> #tryToAddMobToParty(EntityPlayer catcher, EntityCustom entityCaught).

That way you will now be able to:

PlayerParty pp = PlayerParty.get(catcher);

 

I don't quite know where those methods are palced (example: pp.setPartyMember(pp.getNextFreeSlot(), this.hitEntity); seems like being inside holder/projectile, which mean you can access it faster) but you probably get what I mean.

 

I am sometimes bored (I really am) so if you want insight help call me Skype: ernio333

 

pokemon nah but you can think of it as similar to pokeball thrown at a pokemon in an attempt to catch it i guess if that clarifies the end goal. im trying to get that sort of functionality kinda but with a twist, the twist is my holder entity and what it does and the custom animation based on my calculation and you get an egg afterwards rather than a pokeball. ill switch over from using stuff liek EntityCustom and ImpactEntity to EntityPokemon and EntityPokeball if that helps clarify my code?

 

-atm I am saving to both the itemstack and the player just to see if I can and how to do it, eventually I want it to save first to itemstack and when itemstack is picked up by the player then the entity that is inside the itemstack is saved to players party. (think of the itemstack as a spawn egg or if it helps visualize what I want to achieve think of it as a pokeball or whatever youd like to imagine it as Im looking for that kind of functionality roughly)

 

-the caught entity will always be of the same type (of type EntityPartyMember) and is my custom entity, I plan to eliminate all vanilla entities from my mod and dont plan to make my mod compatible with others as that would be a pain to code

 

-EntityPartyMember is the class that I made all of my entities inherit from, it extends EntityAnimal implements IEntityAdditionalSpawnData, I implement my stats system for EntityPartyMember among other stuff.

so EntityEachCustomEntityInMyMod->EntityPartyMember->EntityAnimal->EntityAgeable->EntityCreature->EntityLiving->EntityLivingBase->Entity

 

ok ya i thought i would have to pass arguments it wont be an easy fix but ill give it a go

 

and you are correct I could access it faster but I dont want to, I want it accessed in order i think (unless ill suffer performance issues due to my order or some technical impossible wall I cannot get over or around that prevents me from achieving my goal) but i dont think that should be the case.

 

next time im modding I may give you a should over skype

Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
    • If you are using AMD/ATI, get the latest drivers from their website - do not update via system  
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
  • Topics

×
×
  • Create New...

Important Information

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