Jump to content

[1.8][SOLVED] Attribute Modifier Help


NovaViper

Recommended Posts

Hey, I'm trying to the health and damage attributes switch values whenever a certain condition for the entity is met. I tried switching where the method is called but nothing changes. Here is my code

 

	@Override
public void applyEntityAttributes() {
	super.applyEntityAttributes();
	this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896);
	this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.wildHealth());
	this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(this.wildDamage());
	this.updateEntityAttributes();
}

public void updateEntityAttributes() {
	if (this.isTamed()) {
		if (!this.isChild() && !this.hasEvolved()) {
			this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.tamedHealth() + this.effectiveLevel());
			this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(this.tamedDamage());
		}
		else if (!this.isChild() && this.hasEvolved()) {
			this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.evoHealth());
		}
		else {
			this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.babyHealth());
			this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(this.babyDamage());
		}
	}
	else {
		if (this.isChild()) {
			this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.babyHealth());
			this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(this.babyDamage());
		}
	}
}

public double tamedHealth() { // TODO
	if (this instanceof EntityZertum || this instanceof EntityRedZertum) {
		return 35;
	}
	else if (this instanceof EntityMetalZertum || this instanceof EntityIceZertum || this instanceof EntityForisZertum || this instanceof EntityDestroZertum || this instanceof EntityDarkZertum) {
		return 40;
	}
	return 0;
}

public double tamedDamage() {
	if (this instanceof EntityZertum || this instanceof EntityRedZertum || this instanceof EntityMetalZertum || this instanceof EntityIceZertum || this instanceof EntityForisZertum) {
		return 8;
	}
	else if (this instanceof EntityDestroZertum) {
		return 10;
	}
	else if (this instanceof EntityDarkZertum) {
		return 12;
	}
	return 0;
}

public double evoHealth() {
	if (this instanceof EntityZertum || this instanceof EntityRedZertum || this instanceof EntityIceZertum) {
		return 45;
	}
	else if (this instanceof EntityMetalZertum || this instanceof EntityForisZertum || this instanceof EntityDestroZertum) {
		return 50;
	}
	else if (this instanceof EntityDarkZertum) {
		return 60;
	}
	return 0;
}

public double wildHealth() {
	if (this instanceof EntityZertum || this instanceof EntityRedZertum || this instanceof EntityForisZertum) {
		return 25;
	}
	else if (this instanceof EntityMetalZertum || this instanceof EntityDestroZertum || this instanceof EntityDarkZertum) {
		return 30;
	}
	else if (this instanceof EntityIceZertum) {
		return 35;
	}
	return 0;
}

public double wildDamage() {
	if (this instanceof EntityZertum || this instanceof EntityRedZertum || this instanceof EntityMetalZertum || this instanceof EntityIceZertum || this instanceof EntityForisZertum) {
		return 6;
	}
	else if (this instanceof EntityDestroZertum) {
		return 8;
	}
	else if (this instanceof EntityDarkZertum) {
		return 10;
	}
	return 0;
}

public double babyHealth() {
	return 10;
}

public double babyDamage() {
	if (this instanceof EntityZertum || this instanceof EntityRedZertum || this instanceof EntityMetalZertum) {
		return 2;
	}
	else if (this instanceof EntityIceZertum || this instanceof EntityForisZertum || this instanceof EntityDarkZertum) {
		return 4;
	}
	else if (this instanceof EntityDestroZertum) {
		return 3;
	}
	return 0;
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

applyEntityAttributes is called when the entity is first constructed (i.e. before NBT is read), so your entity does not yet know if it is a child or evolved or anything else.

 

You will need to update the attributes somewhere else, such as readFromNBT, onSpawnWithEgg, or better, when you set 'hasEvolved' or any other field that influences them.

 

The shared monster attributes are all saved, so if you set them once (such as from setEvolved() or whatever), they will retain the values you set when you reload the game.

Link to comment
Share on other sites

I noticed that and now I got it to work, I did the same thing that in the EntityWolf did: it overrided the default setTame method and added the attribute switches. Also I put these switches in my commands that switches the birth stage of the creatures.  I have another little issue though, the creature's stats are displayed in a GUI, the health and other stats are being updated but the damage and speed isn't changing when setting the creature to a baby (works when taming and evolving it, which ONLY changes the damage; but I have talents that changes the speed and damage). My code is on my Github: https://github.com/NovaViper/ZeroQuest/tree/master/src/main/java/common/zeroquest

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Without searching through your entire code base for unnamed classes, the issue seems to simply be that damage / speed attributes are not automatically sent to the client, whereas health and others are. Are you using attribute modifiers for damage and speed also?

 

If you are not using attribute modifiers for the talent bonuses, then that is your solution. If you are, then the solution is either to send a packet to update the client whenever a talent changes or, if the code happens to run on both sides, just apply the talent on both sides. You'll probably still want to send a packet at some point to validate that the value is correct on the client.

 

Show me your 'talent' code that affects damage and speed, as well as where you apply them.

Link to comment
Share on other sites

Not exactly, the methods i'm using to get the values of the attributes are these

 

	@Override
public float getAIMoveSpeed() {
	double speed = this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue();

	speed += TalentHelper.addToMoveSpeed(this);

	if ((!(this.getAttackTarget() instanceof EntityZertumEntity) && !(this.getAttackTarget() instanceof EntityPlayer)) || this.riddenByEntity instanceof EntityPlayer) {
		if (this.levels.getLevel() == Constants.maxLevel && this.hasEvolved()) {
			speed += 1.0D;
		}
		else if (this.hasEvolved() && this.levels.getLevel() != Constants.maxLevel) {
			speed += 1.0D;
		}
	}

	if (this.riddenByEntity instanceof EntityPlayer) {
		speed /= 4;
	}

	return (float) speed;
}

public float getAIAttackDamage() { // TODO
	double damage = this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
	damage += TalentHelper.addToAttackDamage(this);

	if ((!(this.getAttackTarget() instanceof EntityZertumEntity) && !(this.getAttackTarget() instanceof EntityPlayer))) {
		if (this.levels.getLevel() == Constants.maxLevel && this.hasEvolved()) {
			damage += 2.0D;
		}
		else if (this.hasEvolved() && this.levels.getLevel() != Constants.maxLevel) {
			damage += 2.0D;
		}
	}

	return (float) damage;
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Instead of TalentHelper and manually adding adjustments for being evolved, why not add speed modifier as part of the talent / when the entity evolves? Then the entity's speed will be adjusted automatically. Otherwise, you will need to send all of your talents and evolved statuses to the client for it to display the bonuses properly.

Link to comment
Share on other sites

The TalentHelper is for the talents, it adds onto the attribute when the level of the talent is increased. I have this method in the Dasher talent (which adds to the speed of the entity)

 

	@Override
public double addToMoveSpeed(EntityZertumEntity dog) {
	double speed = 0.0D;
	int level = dog.talents.getLevel(this);

	if ((!(dog.getAttackTarget() instanceof EntityZertumEntity) && !(dog.getAttackTarget() instanceof EntityPlayer)) || dog.riddenByEntity instanceof EntityPlayer) {
		if (level == 5) {
			speed += 0.04D;
		}
	}
	speed += 0.03D * level;
	return speed;
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

I realize what your TalentHelper is for, my point is why use it to directly modify the returned speed value when you could instead add an attribute modifier to speed each time your talent changes? This way, you don't have to do ANY calculations at all when returning speed - it is all handled automatically by the SharedMonsterAttribute / AttributeModifiers, which should also automatically be known by the client so you can display the appropriate speed value.

Link to comment
Share on other sites

Hey I fixed it, I added dog.updateEntityAttributes in the TalentHelper methods like so and got it working

 

	public static double addToMoveSpeed(EntityZertumEntity dog) {
	double total = 0;
	for (ITalent talent : TalentRegistry.getTalents()) {
		total += talent.addToMoveSpeed(dog);
		dog.updateEntityAttributes();
	}
	return total;
}

public static double addToAttackDamage(EntityZertumEntity dog) {
	double total = 0;
	for (ITalent talent : TalentRegistry.getTalents()) {
		total += talent.addToAttackDamage(dog);
		dog.updateEntityAttributes();
	}
	return total;
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Oh hey, I have another issue relating to the GUI, the client keeps on crashing whenever I right click on an entity when I am logged in as a different user.

Crash Log

[21:26:53] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2589ms behind, skipping 51 tick(s)
[21:31:16] [server thread/INFO]: Stopping server
[21:31:16] [server thread/INFO]: Saving players
[21:31:16] [server thread/INFO]: Saving worlds
[21:31:16] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[21:31:16] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[21:31:16] [server thread/INFO]: Saving chunks for level 'New World'/The End
[21:31:16] [server thread/INFO]: Saving chunks for level 'New World'/Darkax
[21:31:16] [server thread/INFO]: Saving chunks for level 'New World'/Nillax
[21:31:17] [server thread/INFO] [FML]: Unloading dimension 0
[21:31:17] [server thread/INFO] [FML]: Unloading dimension -1
[21:31:17] [server thread/INFO] [FML]: Unloading dimension 1
[21:31:17] [server thread/INFO] [FML]: Unloading dimension 3
[21:31:17] [server thread/INFO] [FML]: Unloading dimension 2
[21:31:17] [server thread/INFO] [FML]: Applying holder lookups
[21:31:17] [server thread/INFO] [FML]: Holder lookups applied
[21:31:19] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering screen
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1164) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.NullPointerException
at common.zeroquest.client.gui.GuiDogInfo.drawScreen(GuiDogInfo.java:141) ~[GuiDogInfo.class:?]
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:462) ~[ForgeHooksClient.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1134) ~[EntityRenderer.class:?]
... 11 more
[21:31:19] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----
// I feel sad now 

Time: 5/4/15 9:31 PM
Description: Rendering screen

java.lang.NullPointerException: Rendering screen
at common.zeroquest.client.gui.GuiDogInfo.drawScreen(GuiDogInfo.java:141)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:462)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1134)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:376)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)


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

-- Head --
Stacktrace:
at common.zeroquest.client.gui.GuiDogInfo.drawScreen(GuiDogInfo.java:141)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:462)

-- Screen render details --
Details:
Screen name: common.zeroquest.client.gui.GuiDogInfo
Mouse location: Scaled: (341, 176). Absolute: (683, 353)
Screen size: Scaled: (683, 353). Absolute: (1366, 706). Scale factor of 2

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player785'/181, l='MpServer', x=-196.16, y=4.00, z=1167.38]]
Chunk stats: MultiplayerChunkCache: 440, 440
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: -138.00,4.00,1142.00 - World: (-138,4,1142), Chunk: (at 6,0,6 in -9,71; contains blocks -144,0,1136 to -129,255,1151), Region: (-1,2; contains chunks -32,64 to -1,95, blocks -512,0,1024 to -1,255,1535)
Level time: 40930 game time, 27144 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 104 total; [EntityVillager['Villager'/17, l='MpServer', x=-273.44, y=5.00, z=1147.09], EntityVillager['Villager'/18, l='MpServer', x=-276.69, y=4.00, z=1145.91], EntityVillager['Villager'/19, l='MpServer', x=-273.09, y=6.00, z=1163.56], EntitySlime['Slime'/26, l='MpServer', x=-270.75, y=4.00, z=1240.66], EntitySlime['Slime'/29, l='MpServer', x=-262.50, y=4.00, z=1141.00], EntityVillager['Villager'/30, l='MpServer', x=-267.72, y=4.00, z=1142.53], EntityBat['Bat'/31, l='MpServer', x=-269.81, y=6.10, z=1148.38], EntityBat['Bat'/32, l='MpServer', x=-271.88, y=6.10, z=1157.19], EntityVillager['Villager'/33, l='MpServer', x=-269.81, y=4.00, z=1166.50], EntityVillager['Villager'/34, l='MpServer', x=-271.09, y=5.00, z=1160.94], EntitySlime['Slime'/35, l='MpServer', x=-258.19, y=5.16, z=1164.16], EntityVillager['Villager'/36, l='MpServer', x=-269.09, y=5.00, z=1163.50], EntitySlime['Slime'/37, l='MpServer', x=-261.50, y=4.00, z=1171.88], EntityVillager['Villager'/38, l='MpServer', x=-278.25, y=5.00, z=1159.50], EntityVillager['Villager'/39, l='MpServer', x=-256.22, y=5.00, z=1174.47], EntitySlime['Slime'/40, l='MpServer', x=-264.34, y=4.00, z=1227.03], EntityPig['Pig'/44, l='MpServer', x=-244.31, y=4.00, z=1093.09], EntityPig['Pig'/45, l='MpServer', x=-239.94, y=4.00, z=1103.09], EntityBat['Bat'/46, l='MpServer', x=-251.25, y=7.10, z=1166.31], EntitySlime['Slime'/47, l='MpServer', x=-251.91, y=4.00, z=1158.13], EntityItem['item.item.rottenFlesh'/48, l='MpServer', x=-240.75, y=4.00, z=1162.41], EntitySlime['Slime'/49, l='MpServer', x=-250.22, y=5.00, z=1155.22], EntityBat['Bat'/50, l='MpServer', x=-252.25, y=8.10, z=1164.25], EntityVillager['Villager'/51, l='MpServer', x=-236.84, y=5.00, z=1155.72], EntitySlime['Slime'/52, l='MpServer', x=-240.09, y=5.00, z=1153.63], EntityCreeper['Creeper'/53, l='MpServer', x=-257.03, y=5.00, z=1172.47], EntityItem['item.item.egg'/54, l='MpServer', x=-242.38, y=4.00, z=1168.91], EntityVillager['Villager'/55, l='MpServer', x=-251.66, y=5.00, z=1164.78], EntityVillager['Villager'/56, l='MpServer', x=-243.78, y=5.00, z=1180.31], EntityVillager['Villager'/57, l='MpServer', x=-247.56, y=6.00, z=1181.22], EntityVillager['Villager'/58, l='MpServer', x=-254.50, y=4.00, z=1186.28], EntitySlime['Slime'/59, l='MpServer', x=-248.19, y=4.00, z=1228.19], EntitySlime['Slime'/60, l='MpServer', x=-252.13, y=4.00, z=1235.25], EntityPig['Pig'/67, l='MpServer', x=-232.09, y=4.00, z=1096.97], EntityItem['item.item.wheat'/68, l='MpServer', x=-232.75, y=5.00, z=1158.88], EntityItem['item.item.seeds'/69, l='MpServer', x=-231.50, y=5.00, z=1158.97], EntityChicken['Chicken'/70, l='MpServer', x=-227.66, y=4.00, z=1182.34], EntitySlime['Slime'/71, l='MpServer', x=-233.53, y=4.00, z=1178.63], EntitySlime['Slime'/72, l='MpServer', x=-221.06, y=4.00, z=1220.75], EntityPig['Pig'/74, l='MpServer', x=-212.31, y=4.00, z=1093.56], EntityChicken['Chicken'/75, l='MpServer', x=-210.47, y=4.00, z=1106.13], EntityChicken['Chicken'/76, l='MpServer', x=-222.47, y=4.00, z=1113.31], EntityItem['item.item.bone'/77, l='MpServer', x=-216.16, y=4.00, z=1134.56], EntitySlime['Slime'/78, l='MpServer', x=-207.34, y=4.00, z=1123.38], EntityItem['item.item.arrow'/79, l='MpServer', x=-220.44, y=4.00, z=1125.66], EntityItem['item.item.bone'/80, l='MpServer', x=-219.94, y=4.00, z=1125.06], EntityItem['item.item.arrow'/81, l='MpServer', x=-216.28, y=4.00, z=1134.41], EntityChicken['Chicken'/82, l='MpServer', x=-212.34, y=4.00, z=1154.41], EntityItem['item.item.arrow'/83, l='MpServer', x=-217.78, y=4.00, z=1203.97], EntityItem['item.item.bone'/84, l='MpServer', x=-217.06, y=4.00, z=1203.53], EntityItem['item.item.arrow'/85, l='MpServer', x=-208.13, y=4.00, z=1210.44], EntityItem['item.item.arrow'/86, l='MpServer', x=-212.53, y=4.00, z=1202.25], EntitySlime['Slime'/87, l='MpServer', x=-209.34, y=4.75, z=1220.75], EntitySlime['Slime'/88, l='MpServer', x=-212.75, y=4.78, z=1243.69], EntitySlime['Slime'/90, l='MpServer', x=-220.34, y=4.00, z=1241.44], EntitySlime['Slime'/91, l='MpServer', x=-219.16, y=4.00, z=1247.97], EntitySlime['Slime'/97, l='MpServer', x=-210.09, y=4.47, z=1092.06], EntityChicken['Chicken'/99, l='MpServer', x=-200.41, y=4.00, z=1111.03], EntitySlime['Slime'/100, l='MpServer', x=-210.38, y=4.00, z=1108.03], EntityItem['item.item.egg'/101, l='MpServer', x=-205.97, y=4.00, z=1107.56], EntityChicken['Chicken'/102, l='MpServer', x=-198.44, y=4.00, z=1123.38], EntityCreeper['Creeper'/103, l='MpServer', x=-196.19, y=4.00, z=1128.59], EntitySlime['Slime'/104, l='MpServer', x=-202.22, y=5.16, z=1148.94], EntitySpider['Spider'/105, l='MpServer', x=-194.28, y=4.00, z=1155.66], EntitySlime['Slime'/106, l='MpServer', x=-202.59, y=4.02, z=1147.91], EntityItem['item.item.egg'/107, l='MpServer', x=-196.75, y=4.00, z=1159.19], EntityMetalZertum['Blast Max'/108, l='MpServer', x=-195.81, y=4.00, z=1170.22], EntityMetalZertum[''/109, l='MpServer', x=-192.66, y=4.00, z=1179.34], EntitySlime['Slime'/110, l='MpServer', x=-197.44, y=5.22, z=1165.75], EntityItem['item.item.bone'/111, l='MpServer', x=-207.81, y=4.00, z=1211.16], EntitySlime['Slime'/112, l='MpServer', x=-198.16, y=4.00, z=1229.84], EntitySpider['Spider'/113, l='MpServer', x=-207.00, y=4.00, z=1216.63], EntitySlime['Slime'/116, l='MpServer', x=-179.72, y=4.00, z=1158.66], EntityItem['item.item.bone'/117, l='MpServer', x=-183.38, y=4.00, z=1192.78], EntityPig['Pig'/118, l='MpServer', x=-190.84, y=4.00, z=1191.44], EntitySlime['Slime'/119, l='MpServer', x=-184.34, y=4.00, z=1236.69], EntityCow['Cow'/122, l='MpServer', x=-158.78, y=4.00, z=1088.88], EntityPig['Pig'/123, l='MpServer', x=-166.03, y=4.00, z=1142.97], EntityChicken['Chicken'/124, l='MpServer', x=-164.50, y=4.00, z=1165.03], EntitySlime['Slime'/125, l='MpServer', x=-158.50, y=4.00, z=1176.25], EntitySlime['Slime'/126, l='MpServer', x=-166.25, y=4.00, z=1177.78], EntitySlime['Slime'/127, l='MpServer', x=-162.84, y=4.00, z=1182.50], EntityItem['item.item.rottenFlesh'/128, l='MpServer', x=-160.78, y=4.00, z=1190.44], EntityItem['item.item.arrow'/129, l='MpServer', x=-166.56, y=4.00, z=1215.88], EntityCow['Cow'/133, l='MpServer', x=-158.00, y=4.00, z=1090.47], EntitySlime['Slime'/134, l='MpServer', x=-148.69, y=4.00, z=1169.56], EntitySlime['Slime'/135, l='MpServer', x=-150.94, y=4.00, z=1187.91], EntitySlime['Slime'/136, l='MpServer', x=-151.97, y=4.42, z=1191.66], EntitySlime['Slime'/137, l='MpServer', x=-151.00, y=5.00, z=1191.81], EntitySlime['Slime'/138, l='MpServer', x=-154.03, y=5.00, z=1187.69], EntityItem['item.item.rottenFlesh'/139, l='MpServer', x=-159.03, y=4.00, z=1202.56], EntityPig['Pig'/140, l='MpServer', x=-149.13, y=4.00, z=1201.31], EntitySlime['Slime'/145, l='MpServer', x=-146.84, y=4.47, z=1186.75], EntitySlime['Slime'/146, l='MpServer', x=-138.88, y=4.00, z=1198.03], EntitySlime['Slime'/147, l='MpServer', x=-139.66, y=4.00, z=1188.97], EntitySlime['Slime'/148, l='MpServer', x=-140.66, y=4.02, z=1193.66], EntitySlime['Slime'/149, l='MpServer', x=-130.66, y=4.75, z=1201.03], EntityPig['Pig'/150, l='MpServer', x=-143.13, y=4.00, z=1203.94], EntitySpider['Spider'/151, l='MpServer', x=-131.41, y=4.00, z=1236.84], EntitySlime['Slime'/154, l='MpServer', x=-128.22, y=4.42, z=1096.41], EntitySlime['Slime'/156, l='MpServer', x=-123.22, y=4.00, z=1180.28], EntitySlime['Slime'/158, l='MpServer', x=-117.16, y=5.16, z=1210.75], EntitySlime['Slime'/159, l='MpServer', x=-125.47, y=4.00, z=1218.63], EntityPlayerSP['Player785'/181, l='MpServer', x=-196.16, y=4.00, z=1167.38]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:392)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2606)
at net.minecraft.client.Minecraft.run(Minecraft.java:398)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)

 

 

GUI code

package common.zeroquest.client.gui;

import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
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.client.gui.GuiTextField;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;

import org.apache.commons.lang3.StringUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

import common.zeroquest.api.interfaces.ITalent;
import common.zeroquest.api.registry.TalentRegistry;
import common.zeroquest.entity.util.ModeUtil.EnumMode;
import common.zeroquest.entity.zertum.EntityZertumEntity;
import common.zeroquest.lib.Constants;
import common.zeroquest.network.PacketHandler;
import common.zeroquest.network.imessage.ZertumMode;
import common.zeroquest.network.imessage.ZertumName;
import common.zeroquest.network.imessage.ZertumObey;
import common.zeroquest.network.imessage.ZertumTalents;

/**
* @author ProPercivalalb
*/
public class GuiDogInfo extends GuiScreen {

public EntityZertumEntity dog;
public EntityPlayer player;
private ScaledResolution resolution;
private final List<GuiTextField> textfieldList = new ArrayList<GuiTextField>();
private GuiTextField nameTextField;
private int currentPage = 0;
private int maxPages = 1;
public int btnPerPages = 0;
private final DecimalFormat dfShort = new DecimalFormat("0.00");

public GuiDogInfo(EntityZertumEntity dog, EntityPlayer player) {
	this.dog = dog;
	this.player = player;
}

@Override
public void initGui() {
	super.initGui();
	this.buttonList.clear();
	this.labelList.clear();
	this.textfieldList.clear();
	this.resolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
	Keyboard.enableRepeatEvents(true);
	int topX = this.width / 2;
	int topY = this.height / 2;
	GuiTextField nameTextField = new GuiTextField(0, this.fontRendererObj, topX - 100, topY + 50, 200, 20) {
		@Override
		public boolean textboxKeyTyped(char character, int keyId) {
			boolean typed = super.textboxKeyTyped(character, keyId);
			if (typed) {
				PacketHandler.sendToServer(new ZertumName(dog.getEntityId(), this.getText()));
			}
			return typed;
		}
	};
	nameTextField.setFocused(false);
	nameTextField.setMaxStringLength(32);
	nameTextField.setText(this.dog.getZertumName());
	this.nameTextField = nameTextField;

	this.textfieldList.add(nameTextField);

	int size = TalentRegistry.getTalents().size();

	int temp = 0;
	while ((temp + 2) * 21 + 10 < this.resolution.getScaledHeight()) {
		temp += 1;
	}

	this.btnPerPages = temp;

	if (temp < size) {
		this.buttonList.add(new GuiButton(-1, 25, temp * 21 + 10, 20, 20, "<"));
		this.buttonList.add(new GuiButton(-2, 48, temp * 21 + 10, 20, 20, ">"));
	}

	if (this.btnPerPages < 1) {
		this.btnPerPages = 1;
	}

	this.maxPages = (int) Math.ceil((double) TalentRegistry.getTalents().size() / (double) this.btnPerPages);

	if (this.currentPage >= this.maxPages) {
		this.currentPage = 0;
	}

	for (int i = 0; i < this.btnPerPages; ++i) {
		if ((this.currentPage * this.btnPerPages + i) >= TalentRegistry.getTalents().size()) {
			continue;
		}
		this.buttonList.add(new GuiButton(1 + this.currentPage * this.btnPerPages + i, 25, 10 + i * 21, 20, 20, "+"));
	}
	if (this.dog.isOwner(this.player)) {
		this.buttonList.add(new GuiButton(-5, this.width - 64, topY + 65, 42, 20, String.valueOf(this.dog.willObeyOthers())));
	}

	this.buttonList.add(new GuiButton(-6, topX + 40, topY + 25, 60, 20, this.dog.mode.getMode().modeName()));
}

@Override
public void drawScreen(int xMouse, int yMouse, float partialTickTime) {
	this.drawDefaultBackground();
	// Background
	int topX = this.width / 2;
	int topY = this.height / 2;
	String health = dfShort.format(this.dog.getHealth());
	String healthMax = dfShort.format(this.dog.getMaxHealth());
	String healthRel = dfShort.format(this.dog.getHealthRelative() * 100);
	String healthState = health + "/" + healthMax + "(" + healthRel + "%)";
	String damageValue = dfShort.format(this.dog.getAIAttackDamage());
	String damageState = damageValue;
	String speedValue = dfShort.format(this.dog.getAIMoveSpeed());
	String speedState = speedValue;

	String tamedString = null;
	if (this.dog.isTamed()) {
		Entity player = this.dog.getOwner();
		if (player != null) {
			tamedString = "Yes (You)";
		}
		else {
			tamedString = "Yes (" + StringUtils.abbreviate(this.dog.getOwner().getName(), 22) + ")";
		}
	}

	String evoString = null;
	if (!this.dog.hasEvolved() && !this.dog.isChild() && this.dog.levels.getLevel() < Constants.maxLevel) {
		evoString = "Not at Alpha Level!";
	}
	else if (!this.dog.hasEvolved() && this.dog.isChild() && this.dog.levels.getLevel() < Constants.maxLevel) {
		evoString = "Too Young!";
	}
	else if (!this.dog.hasEvolved() && !this.dog.isChild() && this.dog.levels.getLevel() >= Constants.maxLevel) {
		evoString = "Ready!";
	}
	else if (this.dog.hasEvolved() && !this.dog.isChild()) {
		evoString = "Already Evolved!";
	}

	this.fontRendererObj.drawString("New name:", topX - 100, topY + 38, 4210752);
	this.fontRendererObj.drawString("Level: " + this.dog.levels.getLevel(), topX - 75, topY + 75, 0xFF10F9);
	this.fontRendererObj.drawString("Points Left: " + this.dog.spendablePoints(), topX, topY + 75, 0xFFFFFF);
	this.fontRendererObj.drawString("Health: " + healthState, topX + 190, topY - 170, 0xFFFFFF);
	this.fontRendererObj.drawString("Damage: " + damageState, topX + 190, topY - 160, 0xFFFFFF);
	this.fontRendererObj.drawString("Speed: " + speedState, topX + 190, topY - 150, 0xFFFFFF);
	this.fontRendererObj.drawString("Tamed: " + tamedString, topX + 190, topY - 140, 0xFFFFFF);
	this.fontRendererObj.drawString("State: " + evoString, topX + 190, topY - 130, 0xFFFFFF);
	if (this.dog.isOwner(this.player)) {
		this.fontRendererObj.drawString("Obey Others?", this.width - 76, topY + 55, 0xFFFFFF);
	}

	for (int i = 0; i < this.btnPerPages; ++i) {
		if ((this.currentPage * this.btnPerPages + i) >= TalentRegistry.getTalents().size()) {
			continue;
		}
		this.fontRendererObj.drawString(TalentRegistry.getTalent(this.currentPage * this.btnPerPages + i).getLocalisedName(), 50, 17 + i * 21, 0xFFFFFF);
	}

	for (GuiTextField field : this.textfieldList) {
		field.drawTextBox();
	}
	GL11.glDisable(GL12.GL_RESCALE_NORMAL);
	RenderHelper.disableStandardItemLighting();
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glDisable(GL11.GL_DEPTH_TEST);
	super.drawScreen(xMouse, yMouse, partialTickTime);
	RenderHelper.enableGUIStandardItemLighting();

	// Foreground

	GL11.glPushMatrix();
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	for (int k = 0; k < this.buttonList.size(); ++k) {
		GuiButton button = (GuiButton) this.buttonList.get(k);
		if (button.mousePressed(this.mc, xMouse, yMouse)) {
			List list = new ArrayList();
			if (button.id >= 1 && button.id <= TalentRegistry.getTalents().size()) {
				ITalent talent = TalentRegistry.getTalent(button.id - 1);

				list.add(EnumChatFormatting.GREEN + talent.getLocalisedName());
				list.add("Level: " + this.dog.talents.getLevel(talent));
				list.add(EnumChatFormatting.GRAY + "--------------------------------");
				list.addAll(this.splitInto(talent.getLocalisedInfo(), 200, this.mc.fontRendererObj));
			}
			else if (button.id == -1) {
				list.add(EnumChatFormatting.ITALIC + "Previous Page");
			}
			else if (button.id == -2) {
				list.add(EnumChatFormatting.ITALIC + "Next Page");
			}
			else if (button.id == -6) {
				String str = StatCollector.translateToLocal("modeinfo." + button.displayString.toLowerCase());
				list.addAll(splitInto(str, 150, this.mc.fontRendererObj));
			}

			this.drawHoveringText(list, xMouse, yMouse, this.mc.fontRendererObj);
		}
	}
	GL11.glPopMatrix();
}

@Override
protected void actionPerformed(GuiButton button) {

	if (button.id >= 1 && button.id <= TalentRegistry.getTalents().size()) {
		ITalent talent = TalentRegistry.getTalent(button.id - 1);
		int level = this.dog.talents.getLevel(talent);

		if (level < talent.getHighestLevel(this.dog) && this.dog.spendablePoints() >= talent.getCost(this.dog, level + 1)) {
			PacketHandler.sendToServer(new ZertumTalents(this.dog.getEntityId(), TalentRegistry.getTalent(button.id - 1).getKey()));
		}

	}
	else if (button.id == -1) {
		if (this.currentPage > 0) {
			this.currentPage -= 1;
			this.initGui();
		}
	}
	else if (button.id == -2) {
		if (this.currentPage + 1 < this.maxPages) {
			this.currentPage += 1;
			this.initGui();
		}
	}
	if (button.id == -5) {
		if (!this.dog.willObeyOthers()) {
			button.displayString = "true";
			PacketHandler.sendToServer(new ZertumObey(this.dog.getEntityId(), true));

		}
		else {
			button.displayString = "false";
			PacketHandler.sendToServer(new ZertumObey(this.dog.getEntityId(), false));
		}
	}

	if (button.id == -6) {
		int newMode = (dog.mode.getMode().ordinal() + 1) % EnumMode.values().length;
		EnumMode mode = EnumMode.values()[newMode];
		button.displayString = mode.modeName();
		PacketHandler.sendToServer(new ZertumMode(this.dog.getEntityId(), newMode));
	}
}

@Override
public void updateScreen() {
	for (GuiTextField field : this.textfieldList) {
		field.updateCursorCounter();
	}
}

@Override
public void mouseClicked(int xMouse, int yMouse, int mouseButton) throws IOException {
	super.mouseClicked(xMouse, yMouse, mouseButton);
	for (GuiTextField field : this.textfieldList) {
		field.mouseClicked(xMouse, yMouse, mouseButton);
	}
}

@Override
public void keyTyped(char character, int keyId) {
	for (GuiTextField field : this.textfieldList) {
		field.textboxKeyTyped(character, keyId);
	}

	if (keyId == Keyboard.KEY_ESCAPE) {
		this.mc.thePlayer.closeScreen();
	}
}

@Override
public void onGuiClosed() {
	Keyboard.enableRepeatEvents(false);
}

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

public List splitInto(String text, int maxLength, FontRenderer font) {
	List list = new ArrayList();

	String temp = "";
	String[] split = text.split(" ");

	for (int i = 0; i < split.length; ++i) {
		String str = split[i];
		int length = font.getStringWidth(temp + str);

		if (length > maxLength) {
			list.add(temp);
			temp = "";
		}

		temp += str + " ";

		if (i == split.length - 1) {
			list.add(temp);
		}
	}

	return list;
}
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

When the dog entity is not tamed, tamedString remains null and makes crash.

You should initialize it to something other like "Not Tamed" instead of null.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Here

 this.fontRendererObj.drawString("Tamed: " + tamedString, topX + 190, topY - 140, 0xFFFFFF);

 

But its something associated with this

 String tamedString = null;
	if (this.dog.isTamed()) {
		Entity player = this.dog.getOwner();
		if (player != null) {
			tamedString = "Yes (You)";
		}
		else {
			tamedString = "Yes (" + StringUtils.abbreviate(this.dog.getOwner().getName(), 22) + ")";
		}
	}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

No. The tamedString is null.

I already said:

When the dog entity is not tamed, tamedString remains null and makes crash.

You should initialize it to something other like "Not Tamed" instead of null.

 

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

It is null when the dog is not tamed. See the code, all substitutions to tamedString is in if(this.dog.isTamed())

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

First: we don't have all the code.

Second: We have no clear answer on which line the error actually occurs.

But it is clear that the line

this.fontRendererObj.drawString("Tamed: " + tamedString, topX + 190, topY - 140, 0xFFFFFF);

can throw the NPE with tamedString. See the code in GuiDogInfo#drawScreen(int xMouse, int yMouse, float partialTickTime).

tamedString is local variable in the method, it is initialized as null,

and it is only substituted with valid value only if the dog is tamed. So it throws NPE otherwise.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

What I want it to do is say the entity's owner name when another player that does not know thr entity opens the Gui and say 'You' when the owner opens the GUI

There is nothing wrong with your logic, you should only take care of exceptions. You should initialize tamedString to valid String, not null. (Show it as 'Not Tamed', etc.)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

But it is clear that the line

this.fontRendererObj.drawString("Tamed: " + tamedString, topX + 190, topY - 140, 0xFFFFFF);

can throw the NPE with tamedString.

This is wrong.

System.out.println("hello" + null); // prints "hellonull"

So it was not clear; I'm blind. Sorry for that.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

=/ =;

@NovaViper

So did you check if the dog's owner is not null?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

=/ =;

@NovaViper

So did you check if the dog's owner is not null?

 

Somehow, it is null. But I'm trying to make it that if the player isn't in the world, the entity displays that name.

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Somehow, it is null. But I'm trying to make it that if the player isn't in the world, the entity displays that name.

Then save the player's nickname and UUID, and loads the owner instance when he logs in. (Or in readNBT alongside)

(Or it can also be Entity, since entities have UUID and displayname too)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

How exactly do I save it?

Seems like you're having the same issue as Thornack, and the solution will be the same: when you have a valid owner entity, store the display name in another one of your entity's DataWatcher slots (assuming you need it on the client); then be sure to save that value to your entity's NBT tag when it saves, and load it back when it loads.

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

    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
    • I am unable to do that. Brigadier is a mojang library that parses commands.
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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