Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] Getting Entity Data based off of look vector doesnt work


Thornack
 Share

Recommended Posts

I have an item that is a 3D custom rendered item. I want to give it the ability to check a mobs stats that have been saved to NBT on Right click based on the players look vector. For some reason I always get a 0 for all the stats I try to check and im not sure why. I think I am successfully getting the entity my consol prints "This mobs maxHP is 0" and it doesnt matter which stat I try to implement they are all 0. Anyone know why

 

My on Item Right Click Method

 

 

 

@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {

	if (world.isRemote){

		int maxCheckRange = 15;
		   Vec3 vec3 = player.getLookVec().normalize();
		   for(int initialCheckRange = 1;initialCheckRange<maxCheckRange;initialCheckRange++){

		    AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(player.posX + vec3.xCoord * initialCheckRange, player.posY + vec3.yCoord * initialCheckRange, player.posZ + vec3.zCoord * initialCheckRange, player.posX + vec3.xCoord * initialCheckRange, player.posY + vec3.yCoord * initialCheckRange, player.posZ + vec3.zCoord * initialCheckRange);
		    List list = world.getEntitiesWithinAABB(EntityMyMob.class, aabb);
		    if(list.iterator().hasNext()){
		    EntityMyMob ent = (EntityMyMob)list.get(0);
		   int maxHP = ent.getEntityData().getInteger("MaxHP");
	        System.out.println("This mobs maxHP is " + maxHP);
		    
		    }}

		System.out.println("Right-Clicked");
	}
	return itemStack;	
				}


}

 

 

In My custom mobs class I am saving the stats in the following manner

My Entity Class

 

 

public class EntityMyMob extends EntityAnimal {

//IDs for DataWatcher
private static final int ownerDataID = 25;
private static final int hpDataID = 26;
private static final int levelDataID = 27;


public int registryID;

//initialize stats variable so that we can create a unique instance of the MyMobStats class for each MyMob object
public MyMobStats stats = new MyMobStats();
//private boolean baseStatsSaved = false;

public EntityMyMob(World world) {
	/**
	 * gets the texture, sets hitbox size, movement speed, and gets the AI's, get stats for each mob here
	 */
	super(world);
	this.setSize(0.9F, 0.9F); // hitbox size?
	setupAI();
	if(!world.isRemote){
		this.addBaseStatsInformation(this.getEntityData());
	}
}

public int getRegistryID(){
	return MyMobRegistry.getRegistryID(this.getClass());
}

protected void entityInit() {
	super.entityInit();
	this.dataWatcher.addObject(ownerDataID, "");
	this.dataWatcher.addObject(hpDataID, 100);
	this.dataWatcher.addObject(levelDataID, 20);
}

// set up AI tasks
protected void setupAI()
{	
	this.getNavigator().setAvoidsWater(true);
	clearAITasks(); // clear any tasks assigned in super classes
	double speed = 0.5F;
	//this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIMyMobWander(this, speed));
	this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 12.0F));
	this.tasks.addTask(3, new EntityAIPanic(this, speed)); // speed is the second parameter
	this.tasks.addTask(4, new EntityAILookIdle(this));
	this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityMyMob.class, 6.0F));
}
// clears AI Task list in super class
protected void clearAITasks()
{
	tasks.taskEntries.clear();
	targetTasks.taskEntries.clear();
}

// Returns true if the newer Entity AI code should be run
@Override
public boolean isAIEnabled() {
	return true;
}

protected void updateAITasks() {
	super.updateAITasks();
}


@Override
public String getCustomNameTag(){
	if(this.getOwnerName().length() > 0){
		return this.getOwnerName() + "'s " + this.getName();
	}
	return "";
}

//Add a textbox on top of mob if it has a ownerr
public boolean hasCustomNameTag(){
	return this.getOwnerName().length() > 0;
	//return true;
}

@Override
public boolean getAlwaysRenderNameTag(){
	return this.dataWatcher.getWatchableObjectByte(11) == 1;
}

public void setNameTagVisible(boolean visible){
	this.dataWatcher.updateObject(11, (byte)(visible ? 1 : 0));
}

public String getName(){
	return this.getEntityString();
}

public String getOwnerName(){
	return this.dataWatcher.getWatchableObjectString(this.ownerDataID);
}

public EntityLivingBase getOwner(){
	return this.worldObj.getPlayerEntityByName(this.getOwnerName());
}

public void setOwner(String ownerName){
	this.dataWatcher.updateObject(this.ownerDataID,ownerName);
}

public int getHP(){
	return stats.hp;
	//return this.dataWatcher.getWatchableObjectInt(this.hpDataID);
}

public void setHP(int hp){
	stats.hp = hp;
	//this.dataWatcher.updateObject(this.hpDataID, hp);
}


public int getLevel(){
	return this.dataWatcher.getWatchableObjectInt(this.levelDataID);
}

public void setLevel(int level){
	this.dataWatcher.updateObject(this.levelDataID, level);
}

@Override
public void readEntityFromNBT(NBTTagCompound nbtCompound)
{   
	super.readEntityFromNBT(nbtCompound);
	nbtCompound.getString("MobName");
	stats.hp = nbtCompound.getInteger("BaseHP");
	stats.att = nbtCompound.getInteger("BaseAtt");
	stats.def = nbtCompound.getInteger("BaseDef");
	stats.spAtt = nbtCompound.getInteger("BaseSpAtt");
	stats.spDef = nbtCompound.getInteger("BaseSpDef");
	stats.spd = nbtCompound.getInteger("BaseSpd");
}

@Override
public void writeEntityToNBT(NBTTagCompound nbtCompound)
{ 
	super.writeEntityToNBT(nbtCompound);
	//nbtCompound.setBoolean("baseStatsSaved",baseStatsSaved);
	nbtCompound.setString("MobName", EntityList.getEntityString(this));
	nbtCompound.setInteger("BaseHP",stats.hp);
	nbtCompound.setInteger("BaseAtt",stats.att);
	nbtCompound.setInteger("BaseDef",stats.def);
	nbtCompound.setInteger("BaseSpAtt",stats.spAtt);
	nbtCompound.setInteger("BaseSpDef",stats.spDef);
	nbtCompound.setInteger("BaseSpd",stats.spd);
}

public void addBaseStatsInformation(NBTTagCompound nbtCompound){

	String MobName = getName();
	CalcMyMobStats statCalculator = CalcMyMobStats.getInstance();
	statCalculator.generateRandomGenes(stats);
	stats.hp = statCalculator.getBaseHP(MobName) + stats.Genes_HP;
	stats.att = statCalculator.getBaseAttack(MobName) + stats.Genes_Att;
	stats.def = statCalculator.getBaseDefense(MobName) + stats.Genes_Def;
	stats.spAtt = statCalculator.getBaseSpecialAttack(MobName) + stats.Genes_SpAtt;
	stats.spDef = statCalculator.getBaseSpecialDefense(MobName) + stats.Genes_SpDef;
	stats.spd = statCalculator.getBaseSpeed(MobName) +  + stats.Genes_Spd;
}


@Override
public EntityMyMob createChild(EntityAgeable entityageable) {
	return new EntityMyMob(this.worldObj);
}

@Override
/**
 * handles entity death timer, experience orb and particle creation and I think it also despawns the entity after its death animation is played
 */
protected void onDeathUpdate()
{
	++this.deathTime;	//important. Do not remove. Used elsewhere in death animations
	//this.setDead(); //<- commenting this line out results in any mob that dies to fall on its side to the ground and not despawn
}

@Override
public void onDeath(DamageSource p_70645_1_){ 
	//This is called when an entities hp reaches 0, we need to add stuff here to control what happens when a mob's hp reaches 0
}

}

 

 

 

My Stats Container class

 

 

//container that holds stats of a mob
public class MyMobStats {
//TODO: need a way to serialize this structure into a string
//and restore it!
public int registryID;

//current stats
public int level;

public int hp, currentHp;
public int att, currentAtt;
public int def, currentDef;
public int spAtt, currentSpAtt;
public int spDef, currentSpDef;
public int spd, currentSpd;

//random number to be added to base stats to induce mob genetics where some mobs will be stronger than others. These should be initialized when the mob is created, and should
//never change.
public int Genes_HP;
public int Genes_Att;
public int Genes_Def;
public int Genes_SpAtt;
public int Genes_SpDef;
public int Genes_Spd;

//total experience gained from fighting
public int exp;
	}

 

 

Link to comment
Share on other sites

I know that the stats are being saved correctly and calculated correctly Since I have a method to check this where the item that I use to catch my mobs stores their stats and displays them and so I know the stats work correctly. I just cant seem to be able to access these stats using this new item based on a look vector and I dunno y

Link to comment
Share on other sites

world.isRemote - client

!world.isRemote - server

 

You did world.isRemote.

 

As a follow-up - you know that client's values will be 0 (not like server ones), you will need to use packets/dataWatchers.

 

Also - consider making all your stats = 0 (they are not initialized when constructed). Might save you NPE in some critical case (idk your whole coding style, might not).

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

Link to comment
Share on other sites

So I should use !world.isRemote to get the entity server side then send a packet to the client to update the values? If I do !world.isRemote for some reason nothing is displayed to the consol on right click except "Right-Clicked". Shouldnt I be able to see the value of the entities stat that exists on the server if i use !world.isRemote?

Link to comment
Share on other sites

I don't quite get what you mean.

 

Getting entity from vector should be made on server (!world.isRemote) then you will apply changes to server-side values and send packet to clients that will update client-side values, you shouldnt ever use client to compute stuff, unless you have predictable results (operation mirroring). What is the problem?

 

And btw:

if(list.iterator().hasNext()){
		    EntityMyMob ent = (EntityMyMob)list.get(0);

This piece of code breaks eveary law of iteration. xD

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

Link to comment
Share on other sites

I have no idea why but for some reason I cant seem to get the EntityData server side. Does anyone know why? If I change the

 

if (world.isRemote){} to

 

if (!world.isRemote){} then for some reason none of the code inside this if statement gets executed.

Link to comment
Share on other sites

@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
if (!world.isRemote)
{
	System.out.println("WORKS");
}
}

 

Are you telling me this is not printing ANYTHING?

 

Cleanup your code and repost it.

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

Link to comment
Share on other sites

I hope this clarifies it,

 

The System.out.print at line 6 in the code below outprints just fine meaning the method is called on the server just fine

The System.out.print at line 20 inside the for loop does not outprint when I am on the server - when I am on the client however this line DOES work. <- Really weird

[Line 1] @Override
[Line 2]	public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
[Line 3]    if (!world.isRemote) {
[Line 4]			int maxCheckRange = 15;
[Line 5]			Vec3 vec3 = player.getLookVec().normalize();
[Line 6]			System.out.println("On Server"); // This outprints just fine meaning this method gets called on the server successfully
[Line 7]			for (int initialCheckRange = 1; initialCheckRange < maxCheckRange; initialCheckRange++) {
[Line 8]
[Line 9]				AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(
[Line 10]						player.posX + vec3.xCoord * initialCheckRange,
[Line 11]						player.posY	+ vec3.yCoord * initialCheckRange,
[Line 12]						player.posZ	+ vec3.zCoord * initialCheckRange,
[Line 13]						player.posX	+ vec3.xCoord * initialCheckRange,
[Line 14]						player.posY + vec3.yCoord * initialCheckRange,
[Line 15]						player.posZ	+ vec3.zCoord * initialCheckRange);
[Line 16]				List list = world.getEntitiesWithinAABB(EntityMyMob.class,aabb);
[Line 17]				if (list.iterator().hasNext()) {
[Line 18]					EntityMyMob ent = (EntityMyMob) list.get(0);
[Line 19]					int maxHP = ent.getEntityData().getInteger("MaxHP");
[Line 20]					System.out.println("This mobs maxHP is " + maxHP); // This does not out print when I am on the server But does outprint when I am on the client
[Line 21]
[Line 22]				}
[Line 23]			}
[Line 24]
[Line 25]		}
[Line 26]                    return itemStack;
[Line 27] }

 

I have now moved on from trying the method above and have written the following one and it works correctly displaying the hp stats of each entity but I need this method to have a much greater range. Any ideas?

@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {

		   if (!world.isRemote){
			    Minecraft mc = Minecraft.getMinecraft();
			    MovingObjectPosition objectMouseOver = mc.objectMouseOver;
			    if(mc.objectMouseOver != null && mc.objectMouseOver.entityHit != null) {
			        Entity Target = objectMouseOver.entityHit;
			        if(Target instanceof EntityMyMob){
			        	System.out.println("getting entity ");
			        	int maxHP = ((EntityMyMob) Target).stats.hp;
			        	System.out.println("This mobs maxHP is " + maxHP);
			}
		}
	}
	return itemStack;

}

int maxHP = ent.getEntityData().getInteger("MaxHP"); wouldnt work at all and would return 0 no matter what. My stats are being saved to NBT but apparently I cannot get them back from NBT in this way for each instance of MyMob entity in game. Dont know why

I have no idea why

Link to comment
Share on other sites

<facepalm>

 

Minecraft.getMinecraft(), along with objectMouseOver, are both CLIENT side ONLY. Your code will not only not work, but it will also crash if you try it on a server.

 

If you just want to get the entity that the player is looking at, since you are in an Item class, you can use Item#getMovingObjectPositionFromPlayer - this gives you a MovingObjectPosition which you can then check hitType and entityHit.

 

Or you can do the vector calculations yourself.

Link to comment
Share on other sites

I tried the following didnt work :/ turns out raytraces are hard. Im not sure what else to try at this point I cant seem to be able to get the entity

 

@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {

	Entity Target = this.getEntityFromLookVector(world, player);
	System.out.println(Target);
	if (!world.isRemote & Target != null) {
		if (Target instanceof EntityMyMob) {
			System.out.println("getting entity ");
			int maxHP = ((EntityMyMob) Target).stats.hp;
			System.out.println("This mobs maxHP is " + maxHP);
		}
	}
	return itemStack;
}

@SideOnly(Side.CLIENT)
public Entity getEntityFromLookVector (World world, EntityPlayer player){

	MovingObjectPosition mop = player.rayTrace(15, 1.0f);
	if (mop != null)
	{
		System.out.println("mop isnt null" + mop);
	    if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY)
	    {
	    	System.out.println("hit ent");
	        return mop.entityHit;
	    }
}
	return null;
}
}

 

this code never returned an entity as being hit. Even if I stood right next to my mob or even a cow/sheep it would either return one of the following

 

mop isnt nullHitResult{type=BLOCK, x=206, y=3, z=888, f=1, pos=(206.5229233287801, 4.0, 888.9466416142508), entity=null}

mop isnt nullHitResult{type=MISS, x=219, y=12, z=892, f=4, pos=(219.0, 12.750675644892668, 892.5001750429458), entity=null}

Link to comment
Share on other sites

... ... ... Seriously? Again? Look at the method:

[b]@SideOnly(Side.CLIENT)[/b]
public Entity getEntityFromLookVector (World world, EntityPlayer player){

Let's hope the bold works on CLIENT SIDE ONLY!!! Yet you expect results on the server.

 

Did you not read my previous previous comment? I told you exactly which method you can use that already exists - you don't need to write anything but one line to get the raytrace (i.e. MovingObjectPosition). Please read it again.

 

Also, you should know that your naming conventions are incorrect: "Target" would be a class name, not the name of a variable - that would be 'target'.

Link to comment
Share on other sites

@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {

	if (!world.isRemote){
		MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, true);	
		System.out.println(mop);
	}
	return itemStack;
	}	
				}

 

this outprints either null or type hit = block and never outprints type hit to be of type Entity

Link to comment
Share on other sites

I have some code which isn't exactly what you need, but you could use it until you figure out a better solution (which you could find by researching / duplicating the code Minecraft uses on the client to determine the objectMouseOver).

 

Anyway, it's a method that searches for the nearest entity to the player within a certain distance and with a maximum deviation from line-of-sight; if you set the deviation to be small, it will effectively get the objectMouseOver.

 

Still, I would look into EntityRenderer#getMouseOver, or you could even just send the current objectMouseOver's entityId (or null) in a packet from the client, then handle your effect on the server when you receive that packet. That would save you from duplicating a bunch of code at the cost of delaying your action by the amount of time it takes to send a packet (which is usually negligible).

Link to comment
Share on other sites

Thanks coolAlias for the code snippet but I went my own route. I solved my problem by updating the entity by sending a packet from server to client and then getting the entity data client side only. It seems to work ok for what I needed. Although getting it server side would be ideal. For now Im just keeping it client side since Im using my item to test the stats generation that I have implemented.

 

This is my solution (Its pretty ugly but seems to do the job) I open a gui to display the stats that my mob has by using the entityID of the custom mob that was clicked on where its ID is passed through the x coordinate. Don't really know how else to do it and any suggestions would be appreciated.

 

public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
	if (world.isRemote){
		int maxCheckRange = 15;
		Vec3 vec3 = player.getLookVec().normalize();
		for(int initialCheckRange = 1;initialCheckRange<maxCheckRange;initialCheckRange++){

			AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(player.posX + vec3.xCoord * initialCheckRange, player.posY + vec3.yCoord * initialCheckRange, player.posZ + vec3.zCoord * initialCheckRange, player.posX + vec3.xCoord * initialCheckRange, player.posY + vec3.yCoord * initialCheckRange, player.posZ + vec3.zCoord * initialCheckRange);
			List list = world.getEntitiesWithinAABB(EntityMyMob.class, aabb);
			if(list.iterator().hasNext()){
				EntityMyMob ent = (EntityMyMob)list.get(0);

				//Open a GuiStatsDisplay which displays info about the custom mob the player clicked on.
				//(kind of a hack) - the entityID of the custom mob clicked on is passed through the x coordinate.
				//Don't really know how else to do it.
				player.openGui(CustomMod.instance, PWGuiHandler.STATS_GUI_ID, world, (int)ent.getEntityId(), 0, 0);
			}
		}
	}
	return itemStack;	
}

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • [14:10:39] [main/INFO]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 39.0.75, --fml.mcVersion, 1.18.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20211210.034407] [14:10:39] [main/INFO]: ModLauncher 9.1.0+9.1.0+main.6690ee51 starting: java version 17.0.1 by Eclipse Adoptium [14:10:39] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2319!/ Service=ModLauncher Env=SERVER [14:10:40] [main/INFO]: Found mod file AI-Improvements-1.18-0.4.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file BetterDungeons-Forge-1.18.1-1.0.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file BetterMineshafts-Forge-1.18.1-1.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file DungeonsArise-1.18.1-2.1.49d-beta.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file FastFurnace-1.18.1-6.0.2.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file FastWorkbench-1.18.1-6.0.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file ferritecore-4.1.2-forge.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file jmt_mcmt-1.18.1-0.24.2-118-modcore.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file Placebo-1.18.1-6.1.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file TerraForged-1_18_1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file Terralith_v2.0.12_Fabric+Forge.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file YungsApi-1.18.1-Forge-26.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file YungsBridges-Forge-1.18.1-1.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:41] [main/INFO]: Found mod file fmlcore-1.18.1-39.0.75.jar of type LIBRARY with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file javafmllanguage-1.18.1-39.0.75.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file mclanguage-1.18.1-39.0.75.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file server-1.18.1-20211210.034407-srg.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file forge-1.18.1-39.0.75-universal.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:48] [main/INFO]: Compatibility level set to JAVA_17 [14:10:48] [main/INFO]: Launching target 'forgeserver' with arguments [] [14:10:49] [main/WARN]: Reference map 'yungsbridges.refmap.json' for yungsbridges.mixins.json could not be read. If this is a development environment you can ignore this message [14:10:50] [main/INFO]: [JMTSUPERTRANS] PalettedContainerReLock Transformer Called [14:10:50] [main/INFO]: [JMTSUPERTRANS] PalettedContainerReLock Transformer Complete [14:10:51] [main/INFO]: [JMTSUPERTRANS] UtilExecutorListingHack Transformer Called [14:10:51] [main/INFO]: [JMTSUPERTRANS] UtilExecutorListingHack Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] TE Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] TE Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] Entity Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] Entity Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Ran [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldParaProvider Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] Matched method <init> (Lnet/minecraft/server/MinecraftServer;Ljava/util/concurrent/Executor;Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lnet/minecraft/world/level/storage/ServerLevelData;Lnet/minecraft/resources/ResourceKey;Lnet/minecraft/world/level/dimension/DimensionType;Lnet/minecraft/server/level/progress/ChunkProgressListener;Lnet/minecraft/world/level/chunk/ChunkGenerator;ZJLjava/util/List;Z)V [14:10:56] [main/INFO]: [JMTSUPERTRANS] ServerWorldParaProvider Transformer Complete [14:10:57] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Called [14:10:57] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Complete [14:10:57] [main/INFO]: [JMTSUPERTRANS] TE Transformer Called [14:10:57] [main/INFO]: [JMTSUPERTRANS] TE Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkPatch Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkPatch Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkNowPatch Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkNowPatch Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPTick Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPTick Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] ServerWorldTickChunk Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] ServerWorldTickChunk Transformer Complete [14:11:04] [main/INFO]: [JMTSUPERTRANS] ChunkLoadCache Transformer Called [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Called [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Ran [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Complete [14:11:08] [main/INFO]: [JMTSUPERTRANS] World Transformer Called [14:11:08] [main/INFO]: YOU ARE USING 1.16 - Says coremods (if this is wrong something borked) [14:11:08] [main/INFO]: [JMTSUPERTRANS] FOUND TARGET INSNS [14:11:08] [main/INFO]: [JMTSUPERTRANS] World Transformer Complete [14:11:08] [main/INFO]: [JMTSUPERTRANS] ServerExecutionThread Transformer Called [14:11:08] [main/INFO]: [JMTSUPERTRANS] Not seen adding method [14:11:08] [main/INFO]: [JMTSUPERTRANS] ServerExecutionThread Transformer Complete [14:11:09] [modloading-worker-0/INFO]: Forge mod loading, version 39.0.75, for MC 1.18.1 with MCP 20211210.034407 [14:11:09] [modloading-worker-0/INFO]: MinecraftForge v39.0.75 Initialized [14:11:11] [modloading-worker-0/INFO]: Patching ServerResources#<init> [14:11:11] [modloading-worker-0/INFO]: Loaded seedfix v1.0 by Justsnoopy30! [14:11:12] [modloading-worker-0/INFO]: Environment: [14:11:12] [modloading-worker-0/INFO]: - Dev:       false [14:11:12] [modloading-worker-0/INFO]: - Profiling: false [14:11:12] [modloading-worker-0/INFO]: - Unlimited: false [14:11:12] [modloading-worker-0/INFO]: - Debugging: false [14:11:12] [modloading-worker-0/INFO]: - Data Gen:  false [14:11:12] [modloading-worker-0/INFO]: - Cores:     1 [14:11:12] [modloading-worker-0/INFO]: Set TerraForged API: ForgeCommonAPI [14:11:13] [main/INFO]: Registering world-gen core codecs [14:11:13] [main/INFO]: Registering world-gen component codecs [14:11:13] [main/INFO]: Locking mod world-gen registries [14:11:13] [main/INFO]: Registering world-gen content [14:11:14] [Forge Version Check/INFO]: [jmt_mcmt] Starting version check at https://gitcdn.link/repo/jediminer543/JMT-MCMT/master/etc/update.json [14:11:15] [Forge Version Check/INFO]: [jmt_mcmt] Found status: BETA Current: 0.24.2-118 Target: null [14:11:15] [Forge Version Check/INFO]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json [14:11:15] [main/INFO]: Extracting default datapack to /home/container/config/terraforged/pack-v0 [14:11:15] [main/WARN]: Mod 'terraforged' took 2.934 s to run a deferred task. [14:11:16] [modloading-worker-0/INFO]: Got IMC [] [14:11:16] [Forge Version Check/INFO]: [forge] Found status: OUTDATED Current: 39.0.75 Target: 39.1.0 [14:11:21] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:11:21] [main/INFO]: Injecting safe world-gen network codec [14:11:22] [main/INFO]: Injecting world-gen registry defaults [14:11:23] [main/INFO]: Loading world-gen registry content from data [14:11:24] [main/WARN]: Assets URL 'union:/home/container/libraries/net/minecraft/server/1.18.1-20211210.034407/server-1.18.1-20211210.034407-srg.jar%2351!/assets/.mcassetsroot' uses unexpected schema [14:11:24] [main/WARN]: Assets URL 'union:/home/container/libraries/net/minecraft/server/1.18.1-20211210.034407/server-1.18.1-20211210.034407-srg.jar%2351!/data/.mcassetsroot' uses unexpected schema [14:11:24] [main/WARN]: Couldn't get pack info for: net.minecraft.server.packs.ResourcePackFileNotFoundException: 'pack.mcmeta' in ResourcePack './world/datapacks/RPG Mng.zip' [14:11:24] [main/INFO]: Found new data pack file/ExplosionRebuilderDatapack.v2.0.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/ThirtyFangs Kingdom.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/Venturecraft Beta 0.4.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/choicetheorem-overhaul-village-1-18-2-2-8.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/daily-quests-e1041.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/fokastudio-s-ender-expansion-v1-4a-e840.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/incendium-v5-0-3.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/special-mobs-v6-6-spmdpi-3-0.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/splatus-mountain-villages-v1.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/towns-and-towers-structure-overhaul-terralith-1-6.zip, loading it automatically [14:11:25] [main/INFO]: MCMT Registering Commands [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/INFO]: Reloading ResourceManager: Default, YungsApi-1.18.1-Forge-26.jar, BetterDungeons-Forge-1.18.1-1.0.1.jar, jmt_mcmt-1.18.1-0.24.2-118-modcore.jar, FastFurnace-1.18.1-6.0.2.jar, ferritecore-4.1.2-forge.jar, AI-Improvements-1.18-0.4.0.jar, YungsBridges-Forge-1.18.1-1.0.jar, forge-1.18.1-39.0.75-universal.jar, BetterMineshafts-Forge-1.18.1-1.0.jar, Terralith_v2.0.12_Fabric+Forge.jar, TerraForged-1_18_1.jar, FastWorkbench-1.18.1-6.0.1.jar, Placebo-1.18.1-6.1.1.jar, DungeonsArise-1.18.1-2.1.49d-beta.jar, ExplosionRebuilderDatapack.v2.0.zip, ThirtyFangs Kingdom.zip, Venturecraft Beta 0.4.zip, choicetheorem-overhaul-village-1-18-2-2-8.zip, daily-quests-e1041.zip, fokastudio-s-ender-expansion-v1-4a-e840.zip, incendium-v5-0-3.zip, special-mobs-v6-6-spmdpi-3-0.zip, splatus-mountain-villages-v1.zip, towns-and-towers-structure-overhaul-terralith-1-6.zip [14:11:26] [main/WARN]: ResourcePack: ignored non-lowercase namespace: .DS_Store in ./world/datapacks/Venturecraft Beta 0.4.zip [14:11:53] [Worker-Main-2/INFO]: Loaded 7 recipes [14:11:55] [Worker-Main-2/INFO]: Registered 0 additional loot tables. [14:11:56] [Worker-Main-2/INFO]: Loaded 1276 advancements [14:11:56] [Worker-Main-2/INFO]: Registered 0 additional recipes. [14:11:58] [main/FATAL]: Failed to start the minecraft server com.google.gson.JsonParseException: Error loading registry data: Not a valid resource location: #minecraft:infiniburn_end Non [a-z0-9_.-] character in namespace of location: #minecraft:infiniburn_end     at net.minecraft.core.RegistryAccess.m_175498_(RegistryAccess.java:156) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]     at net.minecraft.core.RegistryAccess.m_175503_(RegistryAccess.java:155) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.core.RegistryAccess.m_175500_(RegistryAccess.java:146) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.resources.RegistryReadOps.m_195841_(RegistryReadOps.java:37) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.resources.RegistryReadOps.m_179866_(RegistryReadOps.java:31) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.server.Main.main(Main.java:161) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:46) ~[fmlloader-1.18.1-39.0.75.jar%2323!/:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]   I dont know if this is what you wanted but its the only I could find
    • Mr. diesieben07 und Mr. Luis_ST. Ich danke Ihnen für Ihre Geduld. Erst jetzt habe ich gelernt, dass "Listen Events" als Parameter zurückgegeben werden, also habe ich auch gelernt, dass man Methoden direkt mit Parametern aufrufen kann. Ich stelle den Ereigniscode zur Verfügung, weil es sich um ein geringfügiges Problem handelt und ich ein sehr schlechter Fragesteller wäre, wenn Sie auch für dieses Problem den Ereigniscode selbst durchgehen müssten. Ich verwende derzeit ein Übersetzungsgerät, um mit Ihnen zu kommunizieren, daher werden viele Wörter nicht klar und deutlich zu verstehen sein, und ich entschuldige mich für etwaige Missverständnisse. Ich bin Ihnen beiden dankbar, dass Sie sich trotz Ihres vollen Terminkalenders die Zeit genommen haben, um meine Fragen zu beantworten. Ich gebe Ihnen beiden ein Dankeschön, um meine Dankbarkeit auszudrücken. Ich danke Ihnen nochmals. :):)
    • Whenever I try to start my server I get this crash: [14:05:21] [main/FATAL]: Failed to start the minecraft server com.google.gson.JsonParseException: Error loading registry data: Not a valid resource location: #minecraft:infiniburn_end Non [a-z0-9_.-] character in namespace of location: #minecraft:infiniburn_end         at net.minecraft.core.RegistryAccess.m_175498_(RegistryAccess.java:156) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]         at net.minecraft.core.RegistryAccess.m_175503_(RegistryAccess.java:155) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at net.minecraft.core.RegistryAccess.m_175500_(RegistryAccess.java:146) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at net.minecraft.resources.RegistryReadOps.m_195841_(RegistryReadOps.java:37) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at net.minecraft.resources.RegistryReadOps.m_179866_(RegistryReadOps.java:31) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at net.minecraft.server.Main.main(Main.java:161) ~[server-1.18.1-20211210.034407-srg.jar%2390!/:?]         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]         at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]         at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]         at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:46) ~[fmlloader-1.18.1-39.0.75.jar%2361!/:?]         at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-9.1.0.jar%2343!/:?]         at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) ~[bootstraplauncher-1.0.0.jar:?]         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]         at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]         at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]         at org.jmt.mcmt.modlauncher.FastUtilTransformerService.argumentValues(FastUtilTransformerService.java:200) ~[jmt_mcmt-1.18.1-0.24.2-118-packaged.jar%2375!/:?]         at cpw.mods.modlauncher.TransformationServicesHandler.lambda$offerArgumentResultsToServices$5(TransformationServicesHandler.java:80) ~[modlauncher-9.1.0.jar%235!/:?]         at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]         at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]         at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779) ~[?:?]         at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]         at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]         at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]         at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]         at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]         at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]         at cpw.mods.modlauncher.TransformationServicesHandler.offerArgumentResultsToServices(TransformationServicesHandler.java:80) ~[modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.ArgumentHandler.processArguments(ArgumentHandler.java:71) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.TransformationServicesHandler.processArguments(TransformationServicesHandler.java:68) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:50) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.Launcher.run(Launcher.java:87) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.0.jar%235!/:?]         at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] container@pterodactyl~ Server marked as offline... [Game2 Daemon]: ---------- Detected server process in a crashed state! ---------- [Game2 Daemon]: Exit code: 1 [Game2 Daemon]: Out of memory: false [Game2 Daemon]: Aborting automatic restart, last crash occurred less than 120 seconds ago.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.