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

[1.8][SOLVED] Attribute Modifier Help


NovaViper
 Share

Recommended Posts

=/ =;

@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

  • Replies 105
  • Created
  • Last Reply

Top Posters In This Topic

=/ =;

@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

Hey, I noticed when looking at the EntityTameable code, it doesnt have a NBT for "Owner"

 

    public void writeEntityToNBT(NBTTagCompound tagCompound)
    {
        super.writeEntityToNBT(tagCompound);

        if (this.getOwnerId() == null)
        {
            tagCompound.setString("OwnerUUID", "");
        }
        else
        {
            tagCompound.setString("OwnerUUID", this.getOwnerId());
        }

        tagCompound.setBoolean("Sitting", this.isSitting());
    }

    /**
     * (abstract) Protected helper method to read subclass entity data from NBT.
     */
    public void readEntityFromNBT(NBTTagCompound tagCompund)
    {
        super.readEntityFromNBT(tagCompund);
        String s = "";

        if (tagCompund.hasKey("OwnerUUID", )
        {
            s = tagCompund.getString("OwnerUUID");
        }
        else
        {
            String s1 = tagCompund.getString("Owner"); <<<<< where does it get Owner if it's in the tagCompund?
            s = PreYggdrasilConverter.func_152719_a(s1);
        }

        if (s.length() > 0)
        {
            this.setOwnerId(s);
            this.setTamed(true);
        }

        this.aiSit.setSitting(tagCompund.getBoolean("Sitting"));
        this.setSitting(tagCompund.getBoolean("Sitting"));
    }

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

Hey, I noticed when looking at the EntityTameable code, it doesnt have a NBT for "Owner"

You didn't save the NBT for "Owner" in writeEntityToNBT, so fix 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

Ok, now I'm getting an error saying when I switch players and NOT have the entity set to obey others (this prevents players that do not own the entity to interact with it)

 

[20:09:27] [server thread/ERROR] [FML]: An Entity type common.zeroquest.entity.zertum.EntityZertum has thrown an exception trying to write state. It will not persist. Report this to the mod author
net.minecraft.util.ReportedException: Saving entity NBT
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1637) ~[Entity.class:?]
at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1563) ~[Entity.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:385) [AnvilChunkLoader.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:193) [AnvilChunkLoader.class:?]
at net.minecraft.world.gen.ChunkProviderServer.saveChunkData(ChunkProviderServer.java:266) [ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:332) [ChunkProviderServer.class:?]
at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:976) [WorldServer.class:?]
at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:419) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:147) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
Caused by: java.lang.NullPointerException
at common.zeroquest.entity.zertum.EntityZertumEntity.writeEntityToNBT(EntityZertumEntity.java:299) ~[EntityZertumEntity.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1620) ~[Entity.class:?]
... 10 more

 

And I completely crash with this error log when I DO have the entity set to obey others:

[20:11:24] [server thread/ERROR] [FML]: An Entity type common.zeroquest.entity.zertum.EntityZertum has thrown an exception trying to write state. It will not persist. Report this to the mod author
net.minecraft.util.ReportedException: Saving entity NBT
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1637) ~[Entity.class:?]
at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1563) ~[Entity.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:385) [AnvilChunkLoader.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:193) [AnvilChunkLoader.class:?]
at net.minecraft.world.gen.ChunkProviderServer.saveChunkData(ChunkProviderServer.java:266) [ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:332) [ChunkProviderServer.class:?]
at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:976) [WorldServer.class:?]
at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:419) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:147) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
Caused by: java.lang.NullPointerException
at common.zeroquest.entity.zertum.EntityZertumEntity.writeEntityToNBT(EntityZertumEntity.java:299) ~[EntityZertumEntity.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1620) ~[Entity.class:?]
... 10 more
[20:11:24] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[20:11:24] [server thread/INFO]: Saving chunks for level 'New World'/The End
[20:11:25] [server thread/INFO]: Saving chunks for level 'New World'/Darkax
[20:11:25] [server thread/INFO]: Saving chunks for level 'New World'/Nillax
[20:12:03] [server thread/INFO]: Stopping server
[20:12:03] [server thread/INFO]: Saving players
[20:12:03] [server thread/INFO]: Saving worlds
[20:12:03] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[20:12:03] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[20:12:03] [server thread/INFO]: Saving chunks for level 'New World'/The End
[20:12:03] [server thread/INFO]: Saving chunks for level 'New World'/Darkax
[20:12:03] [server thread/INFO]: Saving chunks for level 'New World'/Nillax
[20:12:04] [server thread/INFO] [FML]: Unloading dimension 0
[20:12:04] [server thread/INFO] [FML]: Unloading dimension -1
[20:12:04] [server thread/INFO] [FML]: Unloading dimension 1
[20:12:04] [server thread/INFO] [FML]: Unloading dimension 3
[20:12:04] [server thread/INFO] [FML]: Unloading dimension 2
[20:12:04] [server thread/INFO] [FML]: Applying holder lookups
[20:12:04] [server thread/INFO] [FML]: Holder lookups applied
[20:12:06] [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:136) ~[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
[20:12:06] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----
// Sorry 

Time: 5/6/15 8:12 PM
Description: Rendering screen

java.lang.NullPointerException: Rendering screen
at common.zeroquest.client.gui.GuiDogInfo.drawScreen(GuiDogInfo.java:136)
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:136)
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['Player782'/167, l='MpServer', x=-200.21, y=4.00, z=1170.59]]
Chunk stats: MultiplayerChunkCache: 20, 20
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: 48930 game time, 4100 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: 16 total; [EntityPig['Pig'/96, l='MpServer', x=-200.66, y=4.00, z=1159.75], EntitySpider['Spider'/97, l='MpServer', x=-193.19, y=4.00, z=1152.69], EntitySlime['Slime'/98, l='MpServer', x=-194.47, y=5.16, z=1167.91], EntityZertum[''/99, l='MpServer', x=-198.44, y=4.00, z=1172.91], EntitySlime['Slime'/100, l='MpServer', x=-187.88, y=5.16, z=1194.84], EntityPlayerSP['Player782'/167, l='MpServer', x=-200.21, y=4.00, z=1170.59], EntityItem['item.item.egg'/76, l='MpServer', x=-222.50, y=4.00, z=1178.97], EntityChicken['Chicken'/77, l='MpServer', x=-218.59, y=4.00, z=1173.59], EntitySpider['Spider'/112, l='MpServer', x=-182.69, y=4.00, z=1185.53], EntitySlime['Slime'/117, l='MpServer', x=-169.72, y=5.22, z=1171.53], EntityItem['item.item.egg'/118, l='MpServer', x=-175.94, y=4.00, z=1179.69], EntitySlime['Slime'/120, l='MpServer', x=-161.91, y=4.42, z=1187.97], EntitySlime['Slime'/121, l='MpServer', x=-164.34, y=4.00, z=1193.41], EntityChicken['Chicken'/122, l='MpServer', x=-160.16, y=4.00, z=1195.00], EntityItem['item.item.egg'/62, l='MpServer', x=-228.44, y=4.00, z=1153.88], EntitySlime['Slime'/63, l='MpServer', x=-232.06, y=4.09, z=1163.72]]
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)

 

My Code:

 

Gui

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()) {
		if (this.dog.getOwner().getName() == this.player.getName()) {
			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;
}
}

 

Entity's Superclass I use with all coding

package common.zeroquest.entity.zertum;

import java.util.HashMap;
import java.util.Map;

import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.init.*;
import net.minecraft.item.*;
import net.minecraft.nbt.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.util.*;
import net.minecraft.world.*;
import net.minecraftforge.fml.relauncher.*;
import common.zeroquest.*;
import common.zeroquest.core.helper.ChatHelper;
import common.zeroquest.entity.EntityCustomTameable;
import common.zeroquest.entity.ai.*;
import common.zeroquest.entity.util.*;
import common.zeroquest.inventory.*;
import common.zeroquest.lib.*;

public abstract class EntityZertumEntity extends EntityCustomTameable {
private float timeDogBegging;
private float prevTimeDogBegging;
public float headRotationCourse;
public float headRotationCourseOld;
public boolean isWet;
public boolean isShaking;
public float timeWolfIsShaking;
public float prevTimeWolfIsShaking;
private int hungerTick;
private int prevHungerTick;
private int healingTick;
private int prevHealingTick;
private int regenerationTick;
private int prevRegenerationTick;
public TalentUtil talents;
public LevelUtil levels;
public ModeUtil mode;
public CoordUtil coords;
public Map<String, Object> objects;
private boolean hasToy;
private float timeWolfIsHappy;
private float prevTimeWolfIsHappy;
private boolean isWolfHappy;
public boolean hiyaMaster;
private float mouthOpenness;
private float prevMouthOpenness;
private int openMouthCounter;

protected EntityAILeapAtTarget aiLeap = new EntityAILeapAtTarget(this, 0.4F);
public EntityAIWatchClosest aiStareAtPlayer = new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F);
public EntityAIWatchClosest aiGlareAtCreeper = new EntityAIWatchClosest(this, EntityCreeper.class, this.talents.getLevel("creeperspotter") * 6);
public EntityAIFetchBone aiFetchBone;

// data value IDs
/** DO NOT CHANGE! **/
public static final int INDEX_TAME = 16;
public static final int INDEX_COLLAR = 19;
public static final int INDEX_SADDLE = 20;
public static final int INDEX_EVOLVE = 25;
public static final int INDEX_MOUTH = 29;
public static final int INDEX_BEG = 30;

public EntityZertumEntity(World worldIn) {
	super(worldIn);
	this.objects = new HashMap<String, Object>();
	this.setSize(0.6F, 1.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.addTask(1, new EntityAISwimming(this));
	this.tasks.addTask(2, this.aiSit);
	this.tasks.addTask(3, this.aiLeap);
	this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
	this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
	this.tasks.addTask(6, this.aiFetchBone = new EntityAIFetchBone(this, 1.0D, 0.5F, 20.0F));
	this.tasks.addTask(7, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(8, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(9, new EntityCustomAIBeg(this, 8.0F));
	this.tasks.addTask(10, aiStareAtPlayer);
	this.tasks.addTask(10, new EntityAILookIdle(this));
	this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
	this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
	this.targetTasks.addTask(3, new EntityAIModeAttackTarget(this));
	this.targetTasks.addTask(4, new EntityAIHurtByTarget(this, true));
	this.setTamed(false);
	this.setEvolved(false);
	this.inventory = new InventoryPack(this);
	this.targetTasks.addTask(6, new EntityAIRoundUp(this, EntityAnimal.class, 0, false));
	TalentHelper.onClassCreation(this);
}

@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() + this.effectiveLevel());
		}
		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());
		}
	}
}

@Override
public void setTamed(boolean p_70903_1_) {
	super.setTamed(p_70903_1_);
	if (p_70903_1_) {
		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 11;
}

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;
}

/**
 * Sets the active target the Task system uses for tracking
 */
@Override
public void setAttackTarget(EntityLivingBase p_70624_1_) {
	super.setAttackTarget(p_70624_1_);
	if (p_70624_1_ == null) {
		this.setAngry(false);
	}
	else if (!this.isTamed()) {
		this.setAngry(true);
	}
}

@Override
public String getName() {
	String name = this.getZertumName();
	if (name != "" && this.isTamed()) {
		return name;
	}
	else {
		return super.getName();
	}
}

@Override
@SideOnly(Side.CLIENT)
public boolean getAlwaysRenderNameTagForRender() {
	return true;
}

@Override
protected void entityInit() { // TODO
	super.entityInit();
	this.talents = new TalentUtil(this);
	this.levels = new LevelUtil(this);
	this.mode = new ModeUtil(this);
	this.coords = new CoordUtil(this);

	this.dataWatcher.addObject(INDEX_COLLAR, new Byte((byte) EnumDyeColor.RED.getMetadata())); // Collar
	this.dataWatcher.addObject(INDEX_SADDLE, Byte.valueOf((byte) 0)); // Saddle
	this.dataWatcher.addObject(21, new String("")); // Dog Name
	this.dataWatcher.addObject(22, new String("")); // Talent Data
	this.dataWatcher.addObject(23, new Integer(Constants.hungerTicks)); // Dog
																		// Hunger
	this.dataWatcher.addObject(24, new String("0:0")); // Level Data
	this.dataWatcher.addObject(INDEX_EVOLVE, Byte.valueOf((byte) 0)); // Evolution
	this.dataWatcher.addObject(26, new Integer(0)); // Obey Others
	this.dataWatcher.addObject(27, new Integer(0)); // Dog Mode
	this.dataWatcher.addObject(28, "-1:-1:-1:-1:-1:-1"); // Dog Coordination
	this.dataWatcher.addObject(INDEX_MOUTH, Integer.valueOf(0)); // Mouth
	this.dataWatcher.addObject(INDEX_BEG, new Byte((byte) 0)); // Begging
}

@Override
public void writeEntityToNBT(NBTTagCompound tagCompound) {
	super.writeEntityToNBT(tagCompound);
	tagCompound.setBoolean("Angry", this.isAngry());
	tagCompound.setString("Owner", this.getOwner().getName());
	tagCompound.setByte("CollarColor", (byte) this.getCollarColor().getDyeDamage());
	tagCompound.setBoolean("Saddle", this.isSaddled());
	tagCompound.setBoolean("Evolve", this.hasEvolved());

	tagCompound.setString("version", Constants.version);
	tagCompound.setString("dogName", this.getZertumName());
	tagCompound.setInteger("dogHunger", this.getDogHunger());
	tagCompound.setBoolean("willObey", this.willObeyOthers());
	tagCompound.setBoolean("dogBeg", this.isBegging());

	this.talents.writeTalentsToNBT(tagCompound);
	this.levels.writeTalentsToNBT(tagCompound);
	this.mode.writeToNBT(tagCompound);
	this.coords.writeToNBT(tagCompound);
	TalentHelper.writeToNBT(this, tagCompound);
}

@Override
public void readEntityFromNBT(NBTTagCompound tagCompound) {
	super.readEntityFromNBT(tagCompound);
	this.setAngry(tagCompound.getBoolean("Angry"));
	this.setSaddled(tagCompound.getBoolean("Saddle"));
	this.setEvolved(tagCompound.getBoolean("Evolve"));

	if (tagCompound.hasKey("CollarColor", 99)) {
		this.setCollarColor(EnumDyeColor.byDyeDamage(tagCompound.getByte("CollarColor")));
	}

	String lastVersion = tagCompound.getString("version");
	this.setZertumName(tagCompound.getString("dogName"));
	this.setDogHunger(tagCompound.getInteger("dogHunger"));
	this.setWillObeyOthers(tagCompound.getBoolean("willObey"));
	this.setBegging(tagCompound.getBoolean("dogBeg"));

	this.talents.readTalentsFromNBT(tagCompound);
	this.levels.readTalentsFromNBT(tagCompound);
	this.mode.readFromNBT(tagCompound);
	this.coords.readFromNBT(tagCompound);
	TalentHelper.readFromNBT(this, tagCompound);
}

@Override
protected void playStepSound(BlockPos p_180429_1_, Block p_180429_2_) {
	this.playSound("mob.wolf.step", 0.15F, 1.0F);
}

/**
 * Returns the sound this mob makes while it's alive.
 */
@Override
protected String getLivingSound() {
	this.openMouth();
	String sound = TalentHelper.getLivingSound(this);
	if (!"".equals(sound)) {
		return sound;
	}

	return this.isAngry() ? "mob.wolf.growl" : this.wantToHowl ? Sound.ZertumHowl
			: (this.rand.nextInt(3) == 0 ? (this.isTamed() && this.getHealth() <= 10.0F
					? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark");
}

/**
 * Returns the sound this mob makes when it is hurt.
 */
@Override
protected String getHurtSound() {
	this.openMouth();
	return "mob.wolf.hurt";
}

/**
 * Returns the sound this mob makes on death.
 */
@Override
protected String getDeathSound() {
	this.openMouth();
	return "mob.wolf.death";
}

/**
 * Returns the volume for the sounds this mob makes.
 */
@Override
public float getSoundVolume() {
	return 1F;
}

/**
 * Get number of ticks, at least during which the living entity will be
 * silent.
 */
@Override
public int getTalkInterval() {
	if ((Boolean) this.objects.get("canseecreeper") == true) {
		return 40;
	}
	else if (this.wantToHowl) {
		return 150;
	}
	else if (this.getHealth() <= 10) {
		return 20;
	}
	else {
		return 200;
	}
}

/**
 * Returns the item ID for the item the mob drops on death.
 */
@Override
protected void dropFewItems(boolean par1, int par2) {
	rare = rand.nextInt(20);
	{
		if (this.isBurning()) {
			this.dropItem(ModItems.zertumMeatCooked, 1);
		}
		else if (rare <= 12) {
			this.dropItem(ModItems.zertumMeatRaw, 1);
		}
		if (rare <= 6 && !this.isTamed() && !(this instanceof EntityDarkZertum)) {
			this.dropItem(ModItems.nileGrain, 1);
		}
		if (rare <= 6 && !this.isTamed() && (this instanceof EntityDarkZertum)) {
			this.dropItem(ModItems.darkGrain, 1);
		}
		if (this.isSaddled()) {
			this.dropItem(Items.saddle, 1);
		}
		else {

		}

	}
}

/**
 * Called frequently so the entity can update its state every tick as
 * required. For example, zombies and skeletons use this to react to
 * sunlight and start to burn.
 */
@Override
public void onLivingUpdate() // TODO
{
	super.onLivingUpdate();
	if (isServer() && this.isWet && !this.isShaking && !this.hasPath() && this.onGround) {
		this.isShaking = true;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
		this.worldObj.setEntityState(this, (byte) ;
	}

	if (Constants.IS_HUNGER_ON) {
		this.prevHungerTick = this.hungerTick;

		if (this.riddenByEntity == null && !this.isSitting()) {
			this.hungerTick += 1;
		}

		this.hungerTick += TalentHelper.onHungerTick(this, this.hungerTick - this.prevHungerTick);

		if (this.hungerTick > 400) {
			this.setDogHunger(this.getDogHunger() - 1);
			this.hungerTick -= 400;
		}
	}

	if (Constants.DEF_HEALING == true && !this.isChild() && this.getHealth() <= 10 && this.isTamed()) {
		this.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200));
	}

	if (this.getHealth() != 1) {
		this.prevHealingTick = this.healingTick;
		this.healingTick += this.nourishment();

		if (this.healingTick >= 6000) {
			if (this.getHealth() < this.getMaxHealth()) {
				this.setHealth(this.getHealth() + 1);
			}

			this.healingTick = 0;
		}
	}

	if (this.getDogHunger() == 0 && this.worldObj.getWorldInfo().getWorldTime() % 100L == 0L && this.getHealth() > 1) {
		this.attackEntityFrom(DamageSource.generic, 1);
	}

	if (isServer() && this.getAttackTarget() == null && this.isAngry()) {
		this.setAngry(false);
	}

	if (Constants.DEF_HOWL == true) {
		if (this.isServer()) {
			if (this.worldObj.isDaytime() && this.isChild()) // TODO
			{
				wantToHowl = false;
			}
			else if (!this.isChild()) {
				wantToHowl = true;
			}
		}
	}
	TalentHelper.onLivingUpdate(this);
}

/**
 * Called to update the entity's position/logic.
 */
@Override
public void onUpdate() {
	super.onUpdate();
	this.prevTimeDogBegging = this.timeDogBegging;

	if (this.isBegging()) {
		this.timeDogBegging += (1.0F - this.timeDogBegging) * 0.4F;
	}
	else {
		this.timeDogBegging += (0.0F - this.timeDogBegging) * 0.4F;
	}

	if (this.openMouthCounter > 0 && ++this.openMouthCounter > 30) {
		this.openMouthCounter = 0;
		this.setHorseWatchableBoolean(128, false);
	}

	this.prevMouthOpenness = this.mouthOpenness;

	if (this.getHorseWatchableBoolean(128)) {
		this.mouthOpenness += (1.0F - this.mouthOpenness) * 0.7F + 0.05F;

		if (this.mouthOpenness > 1.0F) {
			this.mouthOpenness = 1.0F;
		}
	}
	else {
		this.mouthOpenness += (0.0F - this.mouthOpenness) * 0.7F - 0.05F;

		if (this.mouthOpenness < 0.0F) {
			this.mouthOpenness = 0.0F;
		}
	}
	this.headRotationCourseOld = this.headRotationCourse;

	if (this.func_70922_bv()) {
		this.headRotationCourse += (1.0F - this.headRotationCourse) * 0.4F;
	}
	else {
		this.headRotationCourse += (0.0F - this.headRotationCourse) * 0.4F;
	}

	if (this.isWet()) {
		this.isWet = true;
		this.isShaking = false;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
	}
	else if ((this.isWet || this.isShaking) && this.isShaking) {
		if (this.timeWolfIsShaking == 0.0F) {
			this.playSound("mob.wolf.shake", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
		}

		this.prevTimeWolfIsShaking = this.timeWolfIsShaking;
		this.timeWolfIsShaking += 0.05F;

		if (this.prevTimeWolfIsShaking >= 2.0F) {
			if (this.rand.nextInt(15) < this.talents.getLevel("fishing") * 2) {
				if (this.rand.nextInt(15) < this.talents.getLevel("flamingelemental") * 2 && this instanceof EntityRedZertum) {
					if (isServer()) {
						dropItem(Items.cooked_fish, 1);
					}
				}
				else {
					if (isServer()) {
						dropItem(Items.fish, 1);
					}
				}
			}
			this.isWet = false;
			this.isShaking = false;
			this.prevTimeWolfIsShaking = 0.0F;
			this.timeWolfIsShaking = 0.0F;
		}

		if (this.timeWolfIsShaking > 0.4F) {
			float f = (float) this.getEntityBoundingBox().minY;
			int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * (float) Math.PI) * 7.0F);

			for (int j = 0; j < i; ++j) {
				float f1 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
				float f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
				this.worldObj.spawnParticle(EnumParticleTypes.WATER_SPLASH, this.posX + f1, f + 0.8F, this.posZ + f2, this.motionX, this.motionY, this.motionZ, new int[0]);
			}
		}
	}

	if (this.rand.nextInt(200) == 0 && this.hasEvolved()) {
		this.hiyaMaster = true;
	}

	if (((this.isBegging()) || (this.hiyaMaster)) && (!this.isWolfHappy) && this.hasEvolved()) {
		this.isWolfHappy = true;
		this.timeWolfIsHappy = 0.0F;
		this.prevTimeWolfIsHappy = 0.0F;
	}
	else {
		hiyaMaster = false;
	}
	if (this.isWolfHappy) {
		if (this.timeWolfIsHappy % 1.0F == 0.0F) {
			if (!(this instanceof EntityMetalZertum)) {
				this.openMouth();
				this.worldObj.playSoundAtEntity(this, "mob.wolf.panting", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
			}
			else if (this instanceof EntityMetalZertum) {
				this.openMouth();
				this.worldObj.playSoundAtEntity(this, Sound.MetalZertumPant, this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
			}
		}
		this.prevTimeWolfIsHappy = this.timeWolfIsHappy;
		this.timeWolfIsHappy += 0.05F;
		if (this.prevTimeWolfIsHappy >= 8.0F) {
			this.isWolfHappy = false;
			this.prevTimeWolfIsHappy = 0.0F;
			this.timeWolfIsHappy = 0.0F;
		}
	}

	if (this.isTamed()) {
		EntityPlayer player = (EntityPlayer) this.getOwner();

		if (player != null) {
			float distanceToOwner = player.getDistanceToEntity(this);

			if (distanceToOwner <= 2F && this.hasToy()) {
				if (isServer()) {
					this.entityDropItem(new ItemStack(ModItems.toy, 1, 1), 0.0F);
				}
				this.setHasToy(false);
			}
		}
	}
	TalentHelper.onUpdate(this);
}

public float getWagAngle(float f, float f1) {
	float f2 = (this.prevTimeWolfIsHappy + (this.timeWolfIsHappy - this.prevTimeWolfIsHappy) * f + f1) / 2.0F;
	if (f2 < 0.0F) {
		f2 = 0.0F;
	}
	else if (f2 > 2.0F) {
		f2 %= 2.0F;
	}
	return MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.3F * (float) Math.PI;
}

@Override
public void moveEntityWithHeading(float strafe, float forward) {
	if (this.riddenByEntity instanceof EntityPlayer) {
		this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw;
		this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F;
		this.setRotation(this.rotationYaw, this.rotationPitch);
		this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
		strafe = ((EntityPlayer) this.riddenByEntity).moveStrafing * 0.5F;
		forward = ((EntityPlayer) this.riddenByEntity).moveForward;

		if (forward <= 0.0F) {
			forward *= 0.25F;
		}

		if (this.onGround) {
			if (forward > 0.0F) {
				float f2 = MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F);
				float f3 = MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F);
				this.motionX += -0.4F * f2 * 0.15F; // May change
				this.motionZ += 0.4F * f3 * 0.15F;
			}
		}

		this.stepHeight = 1.0F;
		this.jumpMovementFactor = this.getAIMoveSpeed() * 0.2F;

		if (isServer()) {
			this.setAIMoveSpeed((float) this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() / 4);
			super.moveEntityWithHeading(strafe, forward);
		}

		if (this.onGround) {
			// this.jumpPower = 0.0F;
			// this.setHorseJumping(false);
		}

		this.prevLimbSwingAmount = this.limbSwingAmount;
		double d0 = this.posX - this.prevPosX;
		double d1 = this.posZ - this.prevPosZ;
		float f4 = MathHelper.sqrt_double(d0 * d0 + d1 * d1) * 4.0F;

		if (f4 > 1.0F) {
			f4 = 1.0F;
		}

		this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
		this.limbSwing += this.limbSwingAmount;
	}
	else {
		this.stepHeight = 0.5F;
		this.jumpMovementFactor = 0.02F;
		super.moveEntityWithHeading(strafe, forward);
	}
}

@Override
public float getAIMoveSpeed() { // TODO
	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 += 0.4D;
		}
		else if (this.hasEvolved() && this.levels.getLevel() != Constants.maxLevel) {
			speed += 0.4D;
		}
	}

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

	return (float) speed;
}

public float getAIAttackDamage() {
	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;
}

@Override
public void fall(float distance, float damageMultiplier) {
	if (distance > 1.0F) {
		this.playSound("game.neutral.hurt.fall.small", 0.4F, 1.0F);
	}

	int i = MathHelper.ceiling_float_int(((distance * 0.5F - 3.0F) - TalentHelper.fallProtection(this)) * damageMultiplier);

	if (i > 0 && !TalentHelper.isImmuneToFalls(this)) {
		this.attackEntityFrom(DamageSource.fall, i);

		if (this.riddenByEntity != null) {
			this.riddenByEntity.attackEntityFrom(DamageSource.fall, i);
		}

		Block block = this.worldObj.getBlockState(new BlockPos(this.posX, this.posY - 0.2D - this.prevRotationYaw, this.posZ)).getBlock();

		if (block.getMaterial() != Material.air && !this.isSilent()) {
			Block.SoundType soundtype = block.stepSound;
			this.worldObj.playSoundAtEntity(this, soundtype.getStepSound(), soundtype.getVolume() * 0.5F, soundtype.getFrequency() * 0.75F);
		}
	}
}

@SideOnly(Side.CLIENT)
public boolean isWolfWet() {
	return this.isWet;
}

@SideOnly(Side.CLIENT)
public float getShadingWhileWet(float p_70915_1_) {
	return 0.75F + (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70915_1_) / 2.0F * 0.25F;
}

@SideOnly(Side.CLIENT)
public float getShakeAngle(float p_70923_1_, float p_70923_2_) {
	float f2 = (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70923_1_ + p_70923_2_) / 1.8F;

	if (f2 < 0.0F) {
		f2 = 0.0F;
	}
	else if (f2 > 1.0F) {
		f2 = 1.0F;
	}

	return MathHelper.sin(f2 * (float) Math.PI) * MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI;
}

@SideOnly(Side.CLIENT)
public float getInterestedAngle(float partialTickTime) {
	return (this.prevTimeDogBegging + (this.timeDogBegging - this.prevTimeDogBegging) * partialTickTime) * 0.15F * (float) Math.PI;
}

@Override
public float getEyeHeight() {
	return this.height * 0.8F;
}

@Override
public int getVerticalFaceSpeed() {
	return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
}

@Override
public boolean attackEntityFrom(DamageSource damageSource, float damage) {
	if (this.isEntityInvulnerable(damageSource)) {
		return false;
	}
	else {
		if (!TalentHelper.attackEntityFrom(this, damageSource, damage)) {
			return false;
		}

		Entity entity = damageSource.getEntity();
		this.aiSit.setSitting(false);

		if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) {
			damage = (damage + 1.0F) / 2.0F;
		}

		return super.attackEntityFrom(damageSource, damage);
	}
}

@Override
public boolean attackEntityAsMob(Entity entity) { // TODO
	if (!TalentHelper.shouldDamageMob(this, entity)) {
		return false;
	}

	int damage = (int) (4 + (this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getBaseValue()) / 2);
	damage = TalentHelper.attackEntityAsMob(this, entity, damage);

	if (entity instanceof EntityZombie) {
		((EntityZombie) entity).setAttackTarget(this);
	}

	return entity.attackEntityFrom(DamageSource.causeMobDamage(this), damage);
}

/**
 * Called when the mob's health reaches 0.
 */
@Override
public void onDeath(DamageSource par1DamageSource) {
	super.onDeath(par1DamageSource);

	if (par1DamageSource.getEntity() instanceof EntityPlayer) {
		EntityPlayer entityplayer = (EntityPlayer) par1DamageSource.getEntity();
		{
			entityplayer.triggerAchievement(ModAchievements.ZertKill);
			this.dropChestItems();

		}
	}
}

@Override
protected boolean isMovementBlocked() {
	return this.isPlayerSleeping() || this.ridingEntity != null || this.riddenByEntity instanceof EntityPlayer || super.isMovementBlocked();
}

@Override
public double getYOffset() {
	return this.ridingEntity instanceof EntityPlayer ? 0.5D : 0.0D;
}

@Override
public boolean isPotionApplicable(PotionEffect potionEffect) {
	if (this.getHealth() <= 1) {
		return false;
	}

	if (!TalentHelper.isPostionApplicable(this, potionEffect)) {
		return false;
	}

	return true;
}

@Override
public void setFire(int amount) {
	if (TalentHelper.setFire(this, amount)) {
		super.setFire(amount);
	}
}

public int foodValue(ItemStack stack) {
	if (stack == null || stack.getItem() == null) {
		return 0;
	}

	int foodValue = 0;

	Item item = stack.getItem();

	if (stack.getItem() != Items.rotten_flesh && item instanceof ItemFood) {
		ItemFood itemfood = (ItemFood) item;

		if (itemfood.isWolfsFavoriteMeat()) {
			foodValue = 40;
		}
	}

	foodValue = TalentHelper.changeFoodValue(this, stack, foodValue);

	return foodValue;
}

public int masterOrder() { // TODO
	int order = 0;
	EntityPlayer player = (EntityPlayer) this.getOwner();

	if (player != null) {

		float distanceAway = player.getDistanceToEntity(this);
		ItemStack itemstack = player.inventory.getCurrentItem();

		if (itemstack != null && (itemstack.getItem() instanceof ItemTool) && distanceAway <= 20F) {
			order = 1;
		}

		if (itemstack != null && ((itemstack.getItem() instanceof ItemSword) || (itemstack.getItem() instanceof ItemBow))) {
			order = 2;
		}

		if (itemstack != null && itemstack.getItem() == Items.wheat) {
			order = 3;
		}

		if (itemstack != null && itemstack.getItem() == Items.bone) {
			order = 4;
		}
	}

	return order;
}

@Override
public boolean canBreatheUnderwater() {
	return TalentHelper.canBreatheUnderwater(this);
}

@Override
public boolean canInteract(EntityPlayer player) {
	return this.isOwner(player) || this.willObeyOthers();
}

public int nourishment() {
	int amount = 0;

	if (this.getDogHunger() > 0) {
		amount = 40 + 4 * (this.effectiveLevel() + 1);

		if (isSitting() && this.talents.getLevel("rapidregen") == 5) {
			amount += 20 + 2 * (this.effectiveLevel() + 1);
		}

		if (!this.isSitting()) {
			amount *= 5 + this.talents.getLevel("rapidregen");
			amount /= 10;
		}
	}

	return amount;
}

public int effectiveLevel() { // TODO
	return (this.levels.getLevel()) / 10;
}

public String getZertumName() {
	return this.dataWatcher.getWatchableObjectString(21);
}

public void setZertumName(String var1) {
	this.dataWatcher.updateObject(21, var1);
}

public void setWillObeyOthers(boolean flag) {
	this.dataWatcher.updateObject(26, flag ? 1 : 0);
}

public boolean willObeyOthers() {
	return this.dataWatcher.getWatchableObjectInt(26) != 0;
}

public int points() {
	return this.levels.getLevel() + (this.getGrowingAge() < 0 ? 0 : 20);
}

public int spendablePoints() {
	return this.points() - this.usedPoints();
}

public int usedPoints() {
	return TalentHelper.getUsedPoints(this);
}

public int deductive(int level) {
	byte byte0 = 0;
	switch (level) {
		case 1:
			return 1;
		case 2:
			return 3;
		case 3:
			return 5;
		case 4:
			return 7;
		case 5:
			return 9;
		default:
			return 0;
	}
}

public int getDogHunger() {
	return this.dataWatcher.getWatchableObjectInt(23);
}

public void setDogHunger(int par1) {
	this.dataWatcher.updateObject(23, MathHelper.clamp_int(par1, 0, Constants.hungerTicks));
}

@Override
public boolean func_142018_a(EntityLivingBase entityToAttack, EntityLivingBase owner) {
	if (TalentHelper.canAttackEntity(this, entityToAttack)) {
		return true;
	}

	if (!(entityToAttack instanceof EntityCreeper) && !(entityToAttack instanceof EntityGhast)) {
		if (entityToAttack instanceof EntityZertumEntity) {
			EntityZertumEntity entityZertum = (EntityZertumEntity) entityToAttack;

			if (entityZertum.isTamed() && entityZertum.getOwner() == owner) {
				return false;
			}
		}

		return entityToAttack instanceof EntityPlayer && owner instanceof EntityPlayer && !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) entityToAttack)
				? false
				: !(entityToAttack instanceof EntityHorse) || !((EntityHorse) entityToAttack).isTame();
	}
	else {
		return false;
	}
}

@Override
public boolean canAttackClass(Class p_70686_1_) {
	if (TalentHelper.canAttackClass(this, p_70686_1_)) {
		return true;
	}

	return super.canAttackClass(p_70686_1_);
}

public void setHasToy(boolean hasBone) {
	this.hasToy = hasBone;
}

public boolean hasToy() {
	return this.hasToy;
}

/**
 * Gets the pitch of living sounds in living entities.
 */
@Override
public float getPitch() {
	if (!this.isChild()) {
		return super.getSoundPitch();
	}
	else {
		return super.getSoundPitch() * 1;
	}
}

@Override
@SideOnly(Side.CLIENT)
public void handleHealthUpdate(byte p_70103_1_) {
	if (p_70103_1_ ==  {
		this.isShaking = true;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
	}
	else {
		super.handleHealthUpdate(p_70103_1_);
	}
}

/**
 * Checks if the parameter is an item which this animal can be fed to breed
 * it (wheat, carrots or seeds depending on the animal type)
 */
@Override
public boolean isBreedingItem(ItemStack itemstack) {
	return itemstack == null ? false : itemstack.getItem() == ModItems.dogTreat;
}

@Override
public int getMaxSpawnedInChunk() {
	return 8;
}

public boolean isAngry() {
	return (this.dataWatcher.getWatchableObjectByte(INDEX_TAME) & 2) != 0;
}

public void setAngry(boolean p_70916_1_) {
	byte b0 = this.dataWatcher.getWatchableObjectByte(INDEX_TAME);

	if (p_70916_1_) {
		this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte) (b0 | 2)));
	}
	else {
		this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte) (b0 & -3)));
	}
}

public EnumDyeColor getCollarColor() {
	return EnumDyeColor.byDyeDamage(this.dataWatcher.getWatchableObjectByte(INDEX_COLLAR) & 15);
}

public void setCollarColor(EnumDyeColor collarcolor) {
	this.dataWatcher.updateObject(INDEX_COLLAR, Byte.valueOf((byte) (collarcolor.getDyeDamage() & 15)));
}

public boolean isSaddled() {
	return (this.dataWatcher.getWatchableObjectByte(INDEX_SADDLE) & 1) != 0;
}

public void setSaddled(boolean p_70900_1_) {
	if (p_70900_1_) {
		this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte) 1));
	}
	else {
		this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte) 0));
	}
}

private boolean getHorseWatchableBoolean(int p_110233_1_) {
	return (this.dataWatcher.getWatchableObjectInt(INDEX_MOUTH) & p_110233_1_) != 0;
}

private void setHorseWatchableBoolean(int p_110208_1_, boolean p_110208_2_) {
	int j = this.dataWatcher.getWatchableObjectInt(INDEX_MOUTH);

	if (p_110208_2_) {
		this.dataWatcher.updateObject(INDEX_MOUTH, Integer.valueOf(j | p_110208_1_));
	}
	else {
		this.dataWatcher.updateObject(INDEX_MOUTH, Integer.valueOf(j & ~p_110208_1_));
	}
}

@SideOnly(Side.CLIENT)
public float func_110201_q(float p_110201_1_) {
	return this.prevMouthOpenness + (this.mouthOpenness - this.prevMouthOpenness) * p_110201_1_;
}

public void openMouth() {
	if (isServer()) {
		this.openMouthCounter = 1;
		this.setHorseWatchableBoolean(128, true);
	}
}

/**
 * Determines if an entity can be despawned, used on idle far away entities
 */
@Override
protected boolean canDespawn() {
	return !this.isTamed() && this.ticksExisted > 2400;
}

@Override
public boolean allowLeashing() {
	return !this.isAngry() && super.allowLeashing();
}

public void setBegging(boolean flag) {
	this.dataWatcher.updateObject(INDEX_BEG, Byte.valueOf((byte) (flag ? 1 : 0)));
}

public boolean isBegging() {
	return this.dataWatcher.getWatchableObjectByte(INDEX_BEG) == 1;
}

public boolean hasEvolved() // TODO
{
	return (this.dataWatcher.getWatchableObjectByte(INDEX_EVOLVE) & 1) != 0;
}

public void evolveBoolean(boolean p_70900_1_) {
	if (p_70900_1_) {
		this.dataWatcher.updateObject(INDEX_EVOLVE, Byte.valueOf((byte) 1));
	}
	else {
		this.dataWatcher.updateObject(INDEX_EVOLVE, Byte.valueOf((byte) 0));
	}
}

public void setEvolved(boolean p_70900_1_) {
	this.evolveBoolean(p_70900_1_);
	if (p_70900_1_) {
		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 void evolveOnClient(EntityPlayer player) {
	this.setEvolved(true);
	this.worldObj.playBroadcastSound(1013, new BlockPos(this), 0);
	player.addChatMessage(ChatHelper.getChatComponent(EnumChatFormatting.GREEN + this.getZertumName() + " has been evolved!"));
}

public void evolveOnServer(EntityZertumEntity entity, EntityPlayer player) {
	entity.setEvolved(true);
	entity.worldObj.playBroadcastSound(1013, new BlockPos(entity), 0);
	player.addChatMessage(ChatHelper.getChatComponent(EnumChatFormatting.GREEN + entity.getZertumName() + " has been evolved!"));
}
}

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

The GuiDogInfo#player field would be null. Where is the constructor called? GuiHandler? Please post the code.

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

The getOwner().getName() originates in the EntityTameable

 

GUi

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()) {
		if (this.dog.getOwner().getName() == this.player.getName()) {
			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;
}
}

 

Entity

package common.zeroquest.entity.zertum;

import java.util.HashMap;
import java.util.Map;

import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.init.*;
import net.minecraft.item.*;
import net.minecraft.nbt.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.util.*;
import net.minecraft.world.*;
import net.minecraftforge.fml.relauncher.*;
import common.zeroquest.*;
import common.zeroquest.core.helper.ChatHelper;
import common.zeroquest.entity.EntityCustomTameable;
import common.zeroquest.entity.ai.*;
import common.zeroquest.entity.util.*;
import common.zeroquest.inventory.*;
import common.zeroquest.lib.*;

public abstract class EntityZertumEntity extends EntityCustomTameable {
private float timeDogBegging;
private float prevTimeDogBegging;
public float headRotationCourse;
public float headRotationCourseOld;
public boolean isWet;
public boolean isShaking;
public float timeWolfIsShaking;
public float prevTimeWolfIsShaking;
private int hungerTick;
private int prevHungerTick;
private int healingTick;
private int prevHealingTick;
private int regenerationTick;
private int prevRegenerationTick;
public TalentUtil talents;
public LevelUtil levels;
public ModeUtil mode;
public CoordUtil coords;
public Map<String, Object> objects;
private boolean hasToy;
private float timeWolfIsHappy;
private float prevTimeWolfIsHappy;
private boolean isWolfHappy;
public boolean hiyaMaster;
private float mouthOpenness;
private float prevMouthOpenness;
private int openMouthCounter;

protected EntityAILeapAtTarget aiLeap = new EntityAILeapAtTarget(this, 0.4F);
public EntityAIWatchClosest aiStareAtPlayer = new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F);
public EntityAIWatchClosest aiGlareAtCreeper = new EntityAIWatchClosest(this, EntityCreeper.class, this.talents.getLevel("creeperspotter") * 6);
public EntityAIFetchBone aiFetchBone;

// data value IDs
/** DO NOT CHANGE! **/
public static final int INDEX_TAME = 16;
public static final int INDEX_COLLAR = 19;
public static final int INDEX_SADDLE = 20;
public static final int INDEX_EVOLVE = 25;
public static final int INDEX_MOUTH = 29;
public static final int INDEX_BEG = 30;

public EntityZertumEntity(World worldIn) {
	super(worldIn);
	this.objects = new HashMap<String, Object>();
	this.setSize(0.6F, 1.5F);
	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.addTask(1, new EntityAISwimming(this));
	this.tasks.addTask(2, this.aiSit);
	this.tasks.addTask(3, this.aiLeap);
	this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
	this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
	this.tasks.addTask(6, this.aiFetchBone = new EntityAIFetchBone(this, 1.0D, 0.5F, 20.0F));
	this.tasks.addTask(7, new EntityAIMate(this, 1.0D));
	this.tasks.addTask(8, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(9, new EntityCustomAIBeg(this, 8.0F));
	this.tasks.addTask(10, aiStareAtPlayer);
	this.tasks.addTask(10, new EntityAILookIdle(this));
	this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
	this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
	this.targetTasks.addTask(3, new EntityAIModeAttackTarget(this));
	this.targetTasks.addTask(4, new EntityAIHurtByTarget(this, true));
	this.setTamed(false);
	this.setEvolved(false);
	this.inventory = new InventoryPack(this);
	this.targetTasks.addTask(6, new EntityAIRoundUp(this, EntityAnimal.class, 0, false));
	TalentHelper.onClassCreation(this);
}

@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() + this.effectiveLevel());
		}
		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());
		}
	}
}

@Override
public void setTamed(boolean p_70903_1_) {
	super.setTamed(p_70903_1_);
	if (p_70903_1_) {
		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 11;
}

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;
}

/**
 * Sets the active target the Task system uses for tracking
 */
@Override
public void setAttackTarget(EntityLivingBase p_70624_1_) {
	super.setAttackTarget(p_70624_1_);
	if (p_70624_1_ == null) {
		this.setAngry(false);
	}
	else if (!this.isTamed()) {
		this.setAngry(true);
	}
}

@Override
public String getName() {
	String name = this.getZertumName();
	if (name != "" && this.isTamed()) {
		return name;
	}
	else {
		return super.getName();
	}
}

@Override
@SideOnly(Side.CLIENT)
public boolean getAlwaysRenderNameTagForRender() {
	return true;
}

@Override
protected void entityInit() { // TODO
	super.entityInit();
	this.talents = new TalentUtil(this);
	this.levels = new LevelUtil(this);
	this.mode = new ModeUtil(this);
	this.coords = new CoordUtil(this);

	this.dataWatcher.addObject(INDEX_COLLAR, new Byte((byte) EnumDyeColor.RED.getMetadata())); // Collar
	this.dataWatcher.addObject(INDEX_SADDLE, Byte.valueOf((byte) 0)); // Saddle
	this.dataWatcher.addObject(21, new String("")); // Dog Name
	this.dataWatcher.addObject(22, new String("")); // Talent Data
	this.dataWatcher.addObject(23, new Integer(Constants.hungerTicks)); // Dog
																		// Hunger
	this.dataWatcher.addObject(24, new String("0:0")); // Level Data
	this.dataWatcher.addObject(INDEX_EVOLVE, Byte.valueOf((byte) 0)); // Evolution
	this.dataWatcher.addObject(26, new Integer(0)); // Obey Others
	this.dataWatcher.addObject(27, new Integer(0)); // Dog Mode
	this.dataWatcher.addObject(28, "-1:-1:-1:-1:-1:-1"); // Dog Coordination
	this.dataWatcher.addObject(INDEX_MOUTH, Integer.valueOf(0)); // Mouth
	this.dataWatcher.addObject(INDEX_BEG, new Byte((byte) 0)); // Begging
}

@Override
public void writeEntityToNBT(NBTTagCompound tagCompound) {
	super.writeEntityToNBT(tagCompound);
	tagCompound.setBoolean("Angry", this.isAngry());
	tagCompound.setString("Owner", this.getOwner().getName());
	tagCompound.setByte("CollarColor", (byte) this.getCollarColor().getDyeDamage());
	tagCompound.setBoolean("Saddle", this.isSaddled());
	tagCompound.setBoolean("Evolve", this.hasEvolved());

	tagCompound.setString("version", Constants.version);
	tagCompound.setString("dogName", this.getZertumName());
	tagCompound.setInteger("dogHunger", this.getDogHunger());
	tagCompound.setBoolean("willObey", this.willObeyOthers());
	tagCompound.setBoolean("dogBeg", this.isBegging());

	this.talents.writeTalentsToNBT(tagCompound);
	this.levels.writeTalentsToNBT(tagCompound);
	this.mode.writeToNBT(tagCompound);
	this.coords.writeToNBT(tagCompound);
	TalentHelper.writeToNBT(this, tagCompound);
}

@Override
public void readEntityFromNBT(NBTTagCompound tagCompound) {
	super.readEntityFromNBT(tagCompound);
	this.setAngry(tagCompound.getBoolean("Angry"));
	this.setSaddled(tagCompound.getBoolean("Saddle"));
	this.setEvolved(tagCompound.getBoolean("Evolve"));

	if (tagCompound.hasKey("CollarColor", 99)) {
		this.setCollarColor(EnumDyeColor.byDyeDamage(tagCompound.getByte("CollarColor")));
	}

	String lastVersion = tagCompound.getString("version");
	this.setZertumName(tagCompound.getString("dogName"));
	this.setDogHunger(tagCompound.getInteger("dogHunger"));
	this.setWillObeyOthers(tagCompound.getBoolean("willObey"));
	this.setBegging(tagCompound.getBoolean("dogBeg"));

	this.talents.readTalentsFromNBT(tagCompound);
	this.levels.readTalentsFromNBT(tagCompound);
	this.mode.readFromNBT(tagCompound);
	this.coords.readFromNBT(tagCompound);
	TalentHelper.readFromNBT(this, tagCompound);
}

@Override
protected void playStepSound(BlockPos p_180429_1_, Block p_180429_2_) {
	this.playSound("mob.wolf.step", 0.15F, 1.0F);
}

/**
 * Returns the sound this mob makes while it's alive.
 */
@Override
protected String getLivingSound() {
	this.openMouth();
	String sound = TalentHelper.getLivingSound(this);
	if (!"".equals(sound)) {
		return sound;
	}

	return this.isAngry() ? "mob.wolf.growl" : this.wantToHowl ? Sound.ZertumHowl
			: (this.rand.nextInt(3) == 0 ? (this.isTamed() && this.getHealth() <= 10.0F
					? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark");
}

/**
 * Returns the sound this mob makes when it is hurt.
 */
@Override
protected String getHurtSound() {
	this.openMouth();
	return "mob.wolf.hurt";
}

/**
 * Returns the sound this mob makes on death.
 */
@Override
protected String getDeathSound() {
	this.openMouth();
	return "mob.wolf.death";
}

/**
 * Returns the volume for the sounds this mob makes.
 */
@Override
public float getSoundVolume() {
	return 1F;
}

/**
 * Get number of ticks, at least during which the living entity will be
 * silent.
 */
@Override
public int getTalkInterval() {
	if ((Boolean) this.objects.get("canseecreeper") == true) {
		return 40;
	}
	else if (this.wantToHowl) {
		return 150;
	}
	else if (this.getHealth() <= 10) {
		return 20;
	}
	else {
		return 200;
	}
}

/**
 * Returns the item ID for the item the mob drops on death.
 */
@Override
protected void dropFewItems(boolean par1, int par2) {
	rare = rand.nextInt(20);
	{
		if (this.isBurning()) {
			this.dropItem(ModItems.zertumMeatCooked, 1);
		}
		else if (rare <= 12) {
			this.dropItem(ModItems.zertumMeatRaw, 1);
		}
		if (rare <= 6 && !this.isTamed() && !(this instanceof EntityDarkZertum)) {
			this.dropItem(ModItems.nileGrain, 1);
		}
		if (rare <= 6 && !this.isTamed() && (this instanceof EntityDarkZertum)) {
			this.dropItem(ModItems.darkGrain, 1);
		}
		if (this.isSaddled()) {
			this.dropItem(Items.saddle, 1);
		}
		else {

		}

	}
}

/**
 * Called frequently so the entity can update its state every tick as
 * required. For example, zombies and skeletons use this to react to
 * sunlight and start to burn.
 */
@Override
public void onLivingUpdate() // TODO
{
	super.onLivingUpdate();
	if (isServer() && this.isWet && !this.isShaking && !this.hasPath() && this.onGround) {
		this.isShaking = true;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
		this.worldObj.setEntityState(this, (byte) ;
	}

	if (Constants.IS_HUNGER_ON) {
		this.prevHungerTick = this.hungerTick;

		if (this.riddenByEntity == null && !this.isSitting()) {
			this.hungerTick += 1;
		}

		this.hungerTick += TalentHelper.onHungerTick(this, this.hungerTick - this.prevHungerTick);

		if (this.hungerTick > 400) {
			this.setDogHunger(this.getDogHunger() - 1);
			this.hungerTick -= 400;
		}
	}

	if (Constants.DEF_HEALING == true && !this.isChild() && this.getHealth() <= 10 && this.isTamed()) {
		this.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200));
	}

	if (this.getHealth() != 1) {
		this.prevHealingTick = this.healingTick;
		this.healingTick += this.nourishment();

		if (this.healingTick >= 6000) {
			if (this.getHealth() < this.getMaxHealth()) {
				this.setHealth(this.getHealth() + 1);
			}

			this.healingTick = 0;
		}
	}

	if (this.getDogHunger() == 0 && this.worldObj.getWorldInfo().getWorldTime() % 100L == 0L && this.getHealth() > 1) {
		this.attackEntityFrom(DamageSource.generic, 1);
	}

	if (isServer() && this.getAttackTarget() == null && this.isAngry()) {
		this.setAngry(false);
	}

	if (Constants.DEF_HOWL == true) {
		if (this.isServer()) {
			if (this.worldObj.isDaytime() && this.isChild()) // TODO
			{
				wantToHowl = false;
			}
			else if (!this.isChild()) {
				wantToHowl = true;
			}
		}
	}
	TalentHelper.onLivingUpdate(this);
}

/**
 * Called to update the entity's position/logic.
 */
@Override
public void onUpdate() {
	super.onUpdate();
	this.prevTimeDogBegging = this.timeDogBegging;

	if (this.isBegging()) {
		this.timeDogBegging += (1.0F - this.timeDogBegging) * 0.4F;
	}
	else {
		this.timeDogBegging += (0.0F - this.timeDogBegging) * 0.4F;
	}

	if (this.openMouthCounter > 0 && ++this.openMouthCounter > 30) {
		this.openMouthCounter = 0;
		this.setHorseWatchableBoolean(128, false);
	}

	this.prevMouthOpenness = this.mouthOpenness;

	if (this.getHorseWatchableBoolean(128)) {
		this.mouthOpenness += (1.0F - this.mouthOpenness) * 0.7F + 0.05F;

		if (this.mouthOpenness > 1.0F) {
			this.mouthOpenness = 1.0F;
		}
	}
	else {
		this.mouthOpenness += (0.0F - this.mouthOpenness) * 0.7F - 0.05F;

		if (this.mouthOpenness < 0.0F) {
			this.mouthOpenness = 0.0F;
		}
	}
	this.headRotationCourseOld = this.headRotationCourse;

	if (this.func_70922_bv()) {
		this.headRotationCourse += (1.0F - this.headRotationCourse) * 0.4F;
	}
	else {
		this.headRotationCourse += (0.0F - this.headRotationCourse) * 0.4F;
	}

	if (this.isWet()) {
		this.isWet = true;
		this.isShaking = false;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
	}
	else if ((this.isWet || this.isShaking) && this.isShaking) {
		if (this.timeWolfIsShaking == 0.0F) {
			this.playSound("mob.wolf.shake", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
		}

		this.prevTimeWolfIsShaking = this.timeWolfIsShaking;
		this.timeWolfIsShaking += 0.05F;

		if (this.prevTimeWolfIsShaking >= 2.0F) {
			if (this.rand.nextInt(15) < this.talents.getLevel("fishing") * 2) {
				if (this.rand.nextInt(15) < this.talents.getLevel("flamingelemental") * 2 && this instanceof EntityRedZertum) {
					if (isServer()) {
						dropItem(Items.cooked_fish, 1);
					}
				}
				else {
					if (isServer()) {
						dropItem(Items.fish, 1);
					}
				}
			}
			this.isWet = false;
			this.isShaking = false;
			this.prevTimeWolfIsShaking = 0.0F;
			this.timeWolfIsShaking = 0.0F;
		}

		if (this.timeWolfIsShaking > 0.4F) {
			float f = (float) this.getEntityBoundingBox().minY;
			int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * (float) Math.PI) * 7.0F);

			for (int j = 0; j < i; ++j) {
				float f1 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
				float f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
				this.worldObj.spawnParticle(EnumParticleTypes.WATER_SPLASH, this.posX + f1, f + 0.8F, this.posZ + f2, this.motionX, this.motionY, this.motionZ, new int[0]);
			}
		}
	}

	if (this.rand.nextInt(200) == 0 && this.hasEvolved()) {
		this.hiyaMaster = true;
	}

	if (((this.isBegging()) || (this.hiyaMaster)) && (!this.isWolfHappy) && this.hasEvolved()) {
		this.isWolfHappy = true;
		this.timeWolfIsHappy = 0.0F;
		this.prevTimeWolfIsHappy = 0.0F;
	}
	else {
		hiyaMaster = false;
	}
	if (this.isWolfHappy) {
		if (this.timeWolfIsHappy % 1.0F == 0.0F) {
			if (!(this instanceof EntityMetalZertum)) {
				this.openMouth();
				this.worldObj.playSoundAtEntity(this, "mob.wolf.panting", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
			}
			else if (this instanceof EntityMetalZertum) {
				this.openMouth();
				this.worldObj.playSoundAtEntity(this, Sound.MetalZertumPant, this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
			}
		}
		this.prevTimeWolfIsHappy = this.timeWolfIsHappy;
		this.timeWolfIsHappy += 0.05F;
		if (this.prevTimeWolfIsHappy >= 8.0F) {
			this.isWolfHappy = false;
			this.prevTimeWolfIsHappy = 0.0F;
			this.timeWolfIsHappy = 0.0F;
		}
	}

	if (this.isTamed()) {
		EntityPlayer player = (EntityPlayer) this.getOwner();

		if (player != null) {
			float distanceToOwner = player.getDistanceToEntity(this);

			if (distanceToOwner <= 2F && this.hasToy()) {
				if (isServer()) {
					this.entityDropItem(new ItemStack(ModItems.toy, 1, 1), 0.0F);
				}
				this.setHasToy(false);
			}
		}
	}
	TalentHelper.onUpdate(this);
}

public float getWagAngle(float f, float f1) {
	float f2 = (this.prevTimeWolfIsHappy + (this.timeWolfIsHappy - this.prevTimeWolfIsHappy) * f + f1) / 2.0F;
	if (f2 < 0.0F) {
		f2 = 0.0F;
	}
	else if (f2 > 2.0F) {
		f2 %= 2.0F;
	}
	return MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.3F * (float) Math.PI;
}

@Override
public void moveEntityWithHeading(float strafe, float forward) {
	if (this.riddenByEntity instanceof EntityPlayer) {
		this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw;
		this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F;
		this.setRotation(this.rotationYaw, this.rotationPitch);
		this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
		strafe = ((EntityPlayer) this.riddenByEntity).moveStrafing * 0.5F;
		forward = ((EntityPlayer) this.riddenByEntity).moveForward;

		if (forward <= 0.0F) {
			forward *= 0.25F;
		}

		if (this.onGround) {
			if (forward > 0.0F) {
				float f2 = MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F);
				float f3 = MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F);
				this.motionX += -0.4F * f2 * 0.15F; // May change
				this.motionZ += 0.4F * f3 * 0.15F;
			}
		}

		this.stepHeight = 1.0F;
		this.jumpMovementFactor = this.getAIMoveSpeed() * 0.2F;

		if (isServer()) {
			this.setAIMoveSpeed((float) this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() / 4);
			super.moveEntityWithHeading(strafe, forward);
		}

		if (this.onGround) {
			// this.jumpPower = 0.0F;
			// this.setHorseJumping(false);
		}

		this.prevLimbSwingAmount = this.limbSwingAmount;
		double d0 = this.posX - this.prevPosX;
		double d1 = this.posZ - this.prevPosZ;
		float f4 = MathHelper.sqrt_double(d0 * d0 + d1 * d1) * 4.0F;

		if (f4 > 1.0F) {
			f4 = 1.0F;
		}

		this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
		this.limbSwing += this.limbSwingAmount;
	}
	else {
		this.stepHeight = 0.5F;
		this.jumpMovementFactor = 0.02F;
		super.moveEntityWithHeading(strafe, forward);
	}
}

@Override
public float getAIMoveSpeed() { // TODO
	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 += 0.4D;
		}
		else if (this.hasEvolved() && this.levels.getLevel() != Constants.maxLevel) {
			speed += 0.4D;
		}
	}

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

	return (float) speed;
}

public float getAIAttackDamage() {
	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;
}

@Override
public void fall(float distance, float damageMultiplier) {
	if (distance > 1.0F) {
		this.playSound("game.neutral.hurt.fall.small", 0.4F, 1.0F);
	}

	int i = MathHelper.ceiling_float_int(((distance * 0.5F - 3.0F) - TalentHelper.fallProtection(this)) * damageMultiplier);

	if (i > 0 && !TalentHelper.isImmuneToFalls(this)) {
		this.attackEntityFrom(DamageSource.fall, i);

		if (this.riddenByEntity != null) {
			this.riddenByEntity.attackEntityFrom(DamageSource.fall, i);
		}

		Block block = this.worldObj.getBlockState(new BlockPos(this.posX, this.posY - 0.2D - this.prevRotationYaw, this.posZ)).getBlock();

		if (block.getMaterial() != Material.air && !this.isSilent()) {
			Block.SoundType soundtype = block.stepSound;
			this.worldObj.playSoundAtEntity(this, soundtype.getStepSound(), soundtype.getVolume() * 0.5F, soundtype.getFrequency() * 0.75F);
		}
	}
}

@SideOnly(Side.CLIENT)
public boolean isWolfWet() {
	return this.isWet;
}

@SideOnly(Side.CLIENT)
public float getShadingWhileWet(float p_70915_1_) {
	return 0.75F + (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70915_1_) / 2.0F * 0.25F;
}

@SideOnly(Side.CLIENT)
public float getShakeAngle(float p_70923_1_, float p_70923_2_) {
	float f2 = (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70923_1_ + p_70923_2_) / 1.8F;

	if (f2 < 0.0F) {
		f2 = 0.0F;
	}
	else if (f2 > 1.0F) {
		f2 = 1.0F;
	}

	return MathHelper.sin(f2 * (float) Math.PI) * MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI;
}

@SideOnly(Side.CLIENT)
public float getInterestedAngle(float partialTickTime) {
	return (this.prevTimeDogBegging + (this.timeDogBegging - this.prevTimeDogBegging) * partialTickTime) * 0.15F * (float) Math.PI;
}

@Override
public float getEyeHeight() {
	return this.height * 0.8F;
}

@Override
public int getVerticalFaceSpeed() {
	return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
}

@Override
public boolean attackEntityFrom(DamageSource damageSource, float damage) {
	if (this.isEntityInvulnerable(damageSource)) {
		return false;
	}
	else {
		if (!TalentHelper.attackEntityFrom(this, damageSource, damage)) {
			return false;
		}

		Entity entity = damageSource.getEntity();
		this.aiSit.setSitting(false);

		if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) {
			damage = (damage + 1.0F) / 2.0F;
		}

		return super.attackEntityFrom(damageSource, damage);
	}
}

@Override
public boolean attackEntityAsMob(Entity entity) { // TODO
	if (!TalentHelper.shouldDamageMob(this, entity)) {
		return false;
	}

	int damage = (int) (4 + (this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getBaseValue()) / 2);
	damage = TalentHelper.attackEntityAsMob(this, entity, damage);

	if (entity instanceof EntityZombie) {
		((EntityZombie) entity).setAttackTarget(this);
	}

	return entity.attackEntityFrom(DamageSource.causeMobDamage(this), damage);
}

/**
 * Called when the mob's health reaches 0.
 */
@Override
public void onDeath(DamageSource par1DamageSource) {
	super.onDeath(par1DamageSource);

	if (par1DamageSource.getEntity() instanceof EntityPlayer) {
		EntityPlayer entityplayer = (EntityPlayer) par1DamageSource.getEntity();
		{
			entityplayer.triggerAchievement(ModAchievements.ZertKill);
			this.dropChestItems();

		}
	}
}

@Override
protected boolean isMovementBlocked() {
	return this.isPlayerSleeping() || this.ridingEntity != null || this.riddenByEntity instanceof EntityPlayer || super.isMovementBlocked();
}

@Override
public double getYOffset() {
	return this.ridingEntity instanceof EntityPlayer ? 0.5D : 0.0D;
}

@Override
public boolean isPotionApplicable(PotionEffect potionEffect) {
	if (this.getHealth() <= 1) {
		return false;
	}

	if (!TalentHelper.isPostionApplicable(this, potionEffect)) {
		return false;
	}

	return true;
}

@Override
public void setFire(int amount) {
	if (TalentHelper.setFire(this, amount)) {
		super.setFire(amount);
	}
}

public int foodValue(ItemStack stack) {
	if (stack == null || stack.getItem() == null) {
		return 0;
	}

	int foodValue = 0;

	Item item = stack.getItem();

	if (stack.getItem() != Items.rotten_flesh && item instanceof ItemFood) {
		ItemFood itemfood = (ItemFood) item;

		if (itemfood.isWolfsFavoriteMeat()) {
			foodValue = 40;
		}
	}

	foodValue = TalentHelper.changeFoodValue(this, stack, foodValue);

	return foodValue;
}

public int masterOrder() { // TODO
	int order = 0;
	EntityPlayer player = (EntityPlayer) this.getOwner();

	if (player != null) {

		float distanceAway = player.getDistanceToEntity(this);
		ItemStack itemstack = player.inventory.getCurrentItem();

		if (itemstack != null && (itemstack.getItem() instanceof ItemTool) && distanceAway <= 20F) {
			order = 1;
		}

		if (itemstack != null && ((itemstack.getItem() instanceof ItemSword) || (itemstack.getItem() instanceof ItemBow))) {
			order = 2;
		}

		if (itemstack != null && itemstack.getItem() == Items.wheat) {
			order = 3;
		}

		if (itemstack != null && itemstack.getItem() == Items.bone) {
			order = 4;
		}
	}

	return order;
}

@Override
public boolean canBreatheUnderwater() {
	return TalentHelper.canBreatheUnderwater(this);
}

@Override
public boolean canInteract(EntityPlayer player) {
	return this.isOwner(player) || this.willObeyOthers();
}

public int nourishment() {
	int amount = 0;

	if (this.getDogHunger() > 0) {
		amount = 40 + 4 * (this.effectiveLevel() + 1);

		if (isSitting() && this.talents.getLevel("rapidregen") == 5) {
			amount += 20 + 2 * (this.effectiveLevel() + 1);
		}

		if (!this.isSitting()) {
			amount *= 5 + this.talents.getLevel("rapidregen");
			amount /= 10;
		}
	}

	return amount;
}

public int effectiveLevel() { // TODO
	return (this.levels.getLevel()) / 10;
}

public String getZertumName() {
	return this.dataWatcher.getWatchableObjectString(21);
}

public void setZertumName(String var1) {
	this.dataWatcher.updateObject(21, var1);
}

public void setWillObeyOthers(boolean flag) {
	this.dataWatcher.updateObject(26, flag ? 1 : 0);
}

public boolean willObeyOthers() {
	return this.dataWatcher.getWatchableObjectInt(26) != 0;
}

public int points() {
	return this.levels.getLevel() + (this.getGrowingAge() < 0 ? 0 : 20);
}

public int spendablePoints() {
	return this.points() - this.usedPoints();
}

public int usedPoints() {
	return TalentHelper.getUsedPoints(this);
}

public int deductive(int level) {
	byte byte0 = 0;
	switch (level) {
		case 1:
			return 1;
		case 2:
			return 3;
		case 3:
			return 5;
		case 4:
			return 7;
		case 5:
			return 9;
		default:
			return 0;
	}
}

public int getDogHunger() {
	return this.dataWatcher.getWatchableObjectInt(23);
}

public void setDogHunger(int par1) {
	this.dataWatcher.updateObject(23, MathHelper.clamp_int(par1, 0, Constants.hungerTicks));
}

@Override
public boolean func_142018_a(EntityLivingBase entityToAttack, EntityLivingBase owner) {
	if (TalentHelper.canAttackEntity(this, entityToAttack)) {
		return true;
	}

	if (!(entityToAttack instanceof EntityCreeper) && !(entityToAttack instanceof EntityGhast)) {
		if (entityToAttack instanceof EntityZertumEntity) {
			EntityZertumEntity entityZertum = (EntityZertumEntity) entityToAttack;

			if (entityZertum.isTamed() && entityZertum.getOwner() == owner) {
				return false;
			}
		}

		return entityToAttack instanceof EntityPlayer && owner instanceof EntityPlayer && !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) entityToAttack)
				? false
				: !(entityToAttack instanceof EntityHorse) || !((EntityHorse) entityToAttack).isTame();
	}
	else {
		return false;
	}
}

@Override
public boolean canAttackClass(Class p_70686_1_) {
	if (TalentHelper.canAttackClass(this, p_70686_1_)) {
		return true;
	}

	return super.canAttackClass(p_70686_1_);
}

public void setHasToy(boolean hasBone) {
	this.hasToy = hasBone;
}

public boolean hasToy() {
	return this.hasToy;
}

/**
 * Gets the pitch of living sounds in living entities.
 */
@Override
public float getPitch() {
	if (!this.isChild()) {
		return super.getSoundPitch();
	}
	else {
		return super.getSoundPitch() * 1;
	}
}

@Override
@SideOnly(Side.CLIENT)
public void handleHealthUpdate(byte p_70103_1_) {
	if (p_70103_1_ ==  {
		this.isShaking = true;
		this.timeWolfIsShaking = 0.0F;
		this.prevTimeWolfIsShaking = 0.0F;
	}
	else {
		super.handleHealthUpdate(p_70103_1_);
	}
}

/**
 * Checks if the parameter is an item which this animal can be fed to breed
 * it (wheat, carrots or seeds depending on the animal type)
 */
@Override
public boolean isBreedingItem(ItemStack itemstack) {
	return itemstack == null ? false : itemstack.getItem() == ModItems.dogTreat;
}

@Override
public int getMaxSpawnedInChunk() {
	return 8;
}

public boolean isAngry() {
	return (this.dataWatcher.getWatchableObjectByte(INDEX_TAME) & 2) != 0;
}

public void setAngry(boolean p_70916_1_) {
	byte b0 = this.dataWatcher.getWatchableObjectByte(INDEX_TAME);

	if (p_70916_1_) {
		this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte) (b0 | 2)));
	}
	else {
		this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte) (b0 & -3)));
	}
}

public EnumDyeColor getCollarColor() {
	return EnumDyeColor.byDyeDamage(this.dataWatcher.getWatchableObjectByte(INDEX_COLLAR) & 15);
}

public void setCollarColor(EnumDyeColor collarcolor) {
	this.dataWatcher.updateObject(INDEX_COLLAR, Byte.valueOf((byte) (collarcolor.getDyeDamage() & 15)));
}

public boolean isSaddled() {
	return (this.dataWatcher.getWatchableObjectByte(INDEX_SADDLE) & 1) != 0;
}

public void setSaddled(boolean p_70900_1_) {
	if (p_70900_1_) {
		this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte) 1));
	}
	else {
		this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte) 0));
	}
}

private boolean getHorseWatchableBoolean(int p_110233_1_) {
	return (this.dataWatcher.getWatchableObjectInt(INDEX_MOUTH) & p_110233_1_) != 0;
}

private void setHorseWatchableBoolean(int p_110208_1_, boolean p_110208_2_) {
	int j = this.dataWatcher.getWatchableObjectInt(INDEX_MOUTH);

	if (p_110208_2_) {
		this.dataWatcher.updateObject(INDEX_MOUTH, Integer.valueOf(j | p_110208_1_));
	}
	else {
		this.dataWatcher.updateObject(INDEX_MOUTH, Integer.valueOf(j & ~p_110208_1_));
	}
}

@SideOnly(Side.CLIENT)
public float func_110201_q(float p_110201_1_) {
	return this.prevMouthOpenness + (this.mouthOpenness - this.prevMouthOpenness) * p_110201_1_;
}

public void openMouth() {
	if (isServer()) {
		this.openMouthCounter = 1;
		this.setHorseWatchableBoolean(128, true);
	}
}

/**
 * Determines if an entity can be despawned, used on idle far away entities
 */
@Override
protected boolean canDespawn() {
	return !this.isTamed() && this.ticksExisted > 2400;
}

@Override
public boolean allowLeashing() {
	return !this.isAngry() && super.allowLeashing();
}

public void setBegging(boolean flag) {
	this.dataWatcher.updateObject(INDEX_BEG, Byte.valueOf((byte) (flag ? 1 : 0)));
}

public boolean isBegging() {
	return this.dataWatcher.getWatchableObjectByte(INDEX_BEG) == 1;
}

public boolean hasEvolved() // TODO
{
	return (this.dataWatcher.getWatchableObjectByte(INDEX_EVOLVE) & 1) != 0;
}

public void evolveBoolean(boolean p_70900_1_) {
	if (p_70900_1_) {
		this.dataWatcher.updateObject(INDEX_EVOLVE, Byte.valueOf((byte) 1));
	}
	else {
		this.dataWatcher.updateObject(INDEX_EVOLVE, Byte.valueOf((byte) 0));
	}
}

public void setEvolved(boolean p_70900_1_) {
	this.evolveBoolean(p_70900_1_);
	if (p_70900_1_) {
		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 void evolveOnClient(EntityPlayer player) {
	this.setEvolved(true);
	this.worldObj.playBroadcastSound(1013, new BlockPos(this), 0);
	player.addChatMessage(ChatHelper.getChatComponent(EnumChatFormatting.GREEN + this.getZertumName() + " has been evolved!"));
}

public void evolveOnServer(EntityZertumEntity entity, EntityPlayer player) {
	entity.setEvolved(true);
	entity.worldObj.playBroadcastSound(1013, new BlockPos(entity), 0);
	player.addChatMessage(ChatHelper.getChatComponent(EnumChatFormatting.GREEN + entity.getZertumName() + " has been evolved!"));
}
}

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

What do you mean? I open the GUI just before the error appears in the crash log

Where is the code for opening Gui, 'cause it is related with this crash.

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

I did show you that code, its the code in the drawScreen method where it adds the frontRenderObj

No, I mean where you call the constructor of the Gui. The gui should be constructed and opened there.

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

Ah ok. It's inside all of the entities that extend to the main class, here is part of the EntityZertum class that has the code

 

	/**
 * Called when a player interacts with a mob. e.g. gets milk from a cow,
 * gets into the saddle on a pig.
 */
@Override
public boolean interact(EntityPlayer player) {
	ItemStack stack = player.inventory.getCurrentItem();

	if (TalentHelper.interactWithPlayer(this, player)) {
		return true;
	}

	if (this.isTamed()) {
		if (stack != null) {
			int foodValue = this.foodValue(stack);

			if (foodValue != 0 && this.getDogHunger() < Constants.hungerTicks && this.canInteract(player)) {
				if (!player.capabilities.isCreativeMode && --stack.stackSize <= 0) {
					player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack) null);
				}
				float volume = getSoundVolume() * 1.0f;
				float pitch = getPitch();
				worldObj.playSoundAtEntity(this, Sound.Chew, volume, pitch);
				this.setDogHunger(this.getDogHunger() + foodValue);
				return true;
			}
			else if (stack.getItem() == Item.getItemFromBlock(Blocks.planks) && this.canInteract(player)) {
				player.openGui(ZeroQuest.instance, CommonProxy.PetInfo, this.worldObj, this.getEntityId(), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
				return true;
			}
			else if (stack.getItem() instanceof IBits && this.canInteract(player)) {
				IBits treat = (IBits) stack.getItem();
				EnumFeedBack type = treat.canGiveToDog(player, this, this.levels.getLevel());
				treat.giveTreat(type, player, this);
				return true;
			}
			else if (stack != null && stack.getItem() == ModItems.evoBit && this.levels.getLevel() == Constants.maxLevel && !this.hasEvolved() && isServer() && this.canInteract(player)) { // TODO
				this.evolveOnClient(player);
			}
			else if (stack.getItem() == Items.shears && this.isOwner(player)) {
				if (!this.worldObj.isRemote) {
					this.setTamed(false);
					this.setEvolved(false);
					this.navigator.clearPathEntity();
					this.setSitting(false);
					this.talents.resetTalents();
					this.setOwnerId("");
					this.setZertumName("");
					this.setWillObeyOthers(false);
					this.mode.setMode(EnumMode.DOCILE);
				}
				return true;
			}
			else if (stack.getItem() == Items.stick && canInteract(player)) // TODO
			{
				if (isServer()) {
					player.openGui(ZeroQuest.instance, CommonProxy.PetPack, this.worldObj, this.getEntityId(), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
					this.worldObj.playSoundEffect(this.posX, this.posY + 0.5D, this.posZ, "random.chestopen", 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
					return true;
				}
			}
			else if (stack.getItem() == Items.dye && this.canInteract(player)) {
				EnumDyeColor enumdyecolor = EnumDyeColor.byDyeDamage(stack.getMetadata());

				if (enumdyecolor != this.getCollarColor()) {
					this.setCollarColor(enumdyecolor);

					if (!player.capabilities.isCreativeMode && --stack.stackSize <= 0) {
						player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack) null);
					}

					return true;
				}
			}
		}

		if (canInteract(player) && isServer() && !this.isBreedingItem(stack)) {
			this.aiSit.setSitting(!this.isSitting());
			this.isJumping = false;
			this.navigator.clearPathEntity();
			this.setAttackTarget((EntityLivingBase) null);
		}
	}
	else if (ItemUtils.consumeEquipped(player, ModItems.nileBone) && !this.isAngry()) {
		if (isServer()) {
			tamedFor(player, rand.nextInt(3) == 0);
			player.triggerAchievement(ModAchievements.ZertTame);
		}
		return true;
	}
	return super.interact(player);
}

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

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

    • hello. I try to create my custom chest BUT that's make me crazy. 1.if I put an item in my custom chest it become doubled, and if I click it ,it will be dispeared.:( 2.the custom chest what i made use the same container in different blocks.   TileEntity: public class SFCTileEntity extends TileEntity implements INamedContainerProvider { public static final int NUMBER_OF_SLOTS = 27; public SFCTileEntity() { super(TileEntityTypeRegistry.TileEntity.get()); chestContents = ChestContents.createForTileEntity(NUMBER_OF_SLOTS, this::canPlayerAccessInventory, this::setChanged); } public boolean canPlayerAccessInventory(PlayerEntity player) { if (this.level.getBlockEntity(this.worldPosition) != this) return false; final double X_CENTRE_OFFSET = 0.5; final double Y_CENTRE_OFFSET = 0.5; final double Z_CENTRE_OFFSET = 0.5; final double MAXIMUM_DISTANCE_SQ = 8.0 * 8.0; return player.distanceToSqr(worldPosition.getX() + X_CENTRE_OFFSET, worldPosition.getY() + Y_CENTRE_OFFSET, worldPosition.getZ() + Z_CENTRE_OFFSET) < MAXIMUM_DISTANCE_SQ; } private static final String CHESTCONTENTS_INVENTORY_TAG = "contents"; @Override public CompoundNBT save(CompoundNBT parentNBTTagCompound) { super.save(parentNBTTagCompound); CompoundNBT inventoryNBT = chestContents.serializeNBT(); parentNBTTagCompound.put(CHESTCONTENTS_INVENTORY_TAG, inventoryNBT); return parentNBTTagCompound; } @Override public void load(BlockState blockState, CompoundNBT parentNBTTagCompound) { super.load(blockState, parentNBTTagCompound); CompoundNBT inventoryNBT = parentNBTTagCompound.getCompound(CHESTCONTENTS_INVENTORY_TAG); chestContents.deserializeNBT(inventoryNBT); } @Override @Nullable public SUpdateTileEntityPacket getUpdatePacket() { CompoundNBT nbtTagCompound = new CompoundNBT(); save(nbtTagCompound); int tileEntityType = 42; return new SUpdateTileEntityPacket(this.worldPosition, tileEntityType, nbtTagCompound); } @Override public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) { BlockState blockState = level.getBlockState(worldPosition); load(blockState, pkt.getTag()); } @Override public CompoundNBT getUpdateTag() { CompoundNBT nbtTagCompound = new CompoundNBT(); save(nbtTagCompound); return nbtTagCompound; } /* Populates this TileEntity with information from the tag, used by vanilla to transmit from server to client * The vanilla default is suitable for this example but I've included an explicit definition anyway. */ @Override public void handleUpdateTag(BlockState blockState, CompoundNBT tag) { this.load(blockState, tag); } @Override public ITextComponent getDisplayName() { return null; } @Nullable @Override public Container createMenu(int windowID, PlayerInventory playerInventory, PlayerEntity playerEntity) { return SFContainer.createContainerServerSide(windowID, playerInventory, chestContents); } public static ChestContents getChestContents() { return chestContents; } private static ChestContents chestContents; }   Container: public class SFContainer extends Container { private static final int HOTBAR_SLOT_COUNT = 9; private static final int PLAYER_INVENTORY_ROW_COUNT = 3; private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; private static final int VANILLA_FIRST_SLOT_INDEX = 0; private static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; private static final int TE_INVENTORY_SLOT_COUNT = SFCTileEntity.NUMBER_OF_SLOTS; public static final int TILE_INVENTORY_YPOS = 18; public static final int PLAYER_INVENTORY_YPOS = 86; public SFContainer(int windowID, PlayerInventory playerInventory, ChestContents chestContents) { super(ContainerTypeRegistry.Container.get(), windowID); PlayerInvWrapper playerInventoryForge = new PlayerInvWrapper(playerInventory); this.chestContents = chestContents; final int SLOT_X_SPACING = 18; final int SLOT_Y_SPACING = 18; final int HOTBAR_XPOS = 8; final int HOTBAR_YPOS = 144; for (int x = 0; x < HOTBAR_SLOT_COUNT; x++) { int slotNumber = x; addSlot(new SlotItemHandler(playerInventoryForge, slotNumber, HOTBAR_XPOS + SLOT_X_SPACING * x, HOTBAR_YPOS)); } final int PLAYER_INVENTORY_XPOS = 8; // Add the rest of the player's inventory to the gui for (int y = 0; y < PLAYER_INVENTORY_ROW_COUNT; y++) { for (int x = 0; x < PLAYER_INVENTORY_COLUMN_COUNT; x++) { int slotNumber = HOTBAR_SLOT_COUNT + y * PLAYER_INVENTORY_COLUMN_COUNT + x; int xpos = PLAYER_INVENTORY_XPOS + x * SLOT_X_SPACING; int ypos = PLAYER_INVENTORY_YPOS + y * SLOT_Y_SPACING; addSlot(new SlotItemHandler(playerInventoryForge, slotNumber, xpos, ypos)); } } // Add the tile inventory container to the gui for(int i = 0;i<9;i++){ addSlot(new Slot(chestContents, i, 8+18*i, 18)); addSlot(new Slot(chestContents, i+9, 8+18*i, 36)); addSlot(new Slot(chestContents, i+18, 8+18*i, 54)); } } public static SFContainer createContainerServerSide(int windowID, PlayerInventory playerInventory, ChestContents chestContents) { return new SFContainer(windowID, playerInventory, chestContents); } public static SFContainer createContainerClientSide(int windowID, PlayerInventory playerInventory, net.minecraft.network.PacketBuffer extraData) { ChestContents chestContents = ChestContents.createForClientSideContainer(SFCTileEntity.NUMBER_OF_SLOTS); return new SFContainer(windowID, playerInventory, chestContents); } @Override public boolean stillValid(PlayerEntity playerEntity) { return chestContents.stillValid(playerEntity); } @Override public ItemStack quickMoveStack(PlayerEntity playerEntity, int sourceSlotIndex) { Slot sourceSlot = getSlot(sourceSlotIndex); if (sourceSlot == null || !sourceSlot.hasItem()) return ItemStack.EMPTY; //EMPTY_ITEM ItemStack sourceStack = sourceSlot.getItem(); ItemStack copyOfSourceStack = sourceStack.copy(); // Check if the slot clicked is one of the vanilla container slots if (sourceSlotIndex >= VANILLA_FIRST_SLOT_INDEX && sourceSlotIndex < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) { // This is a vanilla container slot so merge the stack into the tile inventory if (!moveItemStackTo(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT, false)){ return ItemStack.EMPTY; // EMPTY_ITEM } } else if (sourceSlotIndex >= TE_INVENTORY_FIRST_SLOT_INDEX && sourceSlotIndex < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { // This is a TE slot so merge the stack into the players inventory if (!moveItemStackTo(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) { return ItemStack.EMPTY; } } else { LOGGER.warn("Invalid slotIndex:" + sourceSlotIndex); return ItemStack.EMPTY; } // If stack size == 0 (the entire stack was moved) set slot contents to null if (sourceStack.getCount() == 0) { sourceSlot.mayPlace(ItemStack.EMPTY); } else { sourceSlot.setChanged(); } sourceSlot.onTake(playerEntity, sourceStack); return copyOfSourceStack; } // pass the close container message to the parent inventory (not strictly needed for this example) // see ContainerChest and TileEntityChest - used to animate the lid when no players are accessing the chest any more @Override public void removed(PlayerEntity playerIn) { super.removed(playerIn); } private ChestContents chestContents; private static final Logger LOGGER = LogManager.getLogger(); }  
    • Posting again to finish this thread as I've found a solution for my problem. Don't know why it was having an issue with Java but uninstalled my most recent update of java and switched back to Java 17.02 Here's a link to the version of Java I'm now using https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe Hope it works for whoever is looking for a solution.
    • Hello there, i have an issue. I want to add custom 3d model to armor(I want to create addon that replace armor with samurai armor in Gobber mod). Here is the code: package com.kwpugh.gobber2.items.armor; import java.util.List; import javax.annotation.Nullable; import com.kwpugh.gobber2.config.GobberConfigBuilder; import com.kwpugh.gobber2.init.ItemInit; import com.kwpugh.gobber2.items.armor.models.GobberSamurai; import com.kwpugh.gobber2.util.PlayerSpecialAbilities; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ArmorMaterial; import net.minecraft.world.item.ItemStack; import net.minecraft.world.effect.MobEffects; import net.minecraft.network.chat.Component; import net.minecraft.ChatFormatting; import net.minecraft.client.model.HumanoidModel; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.IItemRenderProperties; import net.minecraft.world.item.Item.Properties; public class ItemCustomArmorNether extends ArmorItem { public ItemCustomArmorNether(ArmorMaterial materialIn, EquipmentSlot slots, Properties builder) { super(materialIn, slots, builder); } boolean enablePerks = GobberConfigBuilder.ENABLE_GOBBER_NETHER_ARMOR_HEALTH_PERKS.get(); int hunger = GobberConfigBuilder.GOBBER_NETHER_ARMOR_HUNGER.get(); double saturation = GobberConfigBuilder.GOBBER_NETHER_ARMOR_SATURATION.get(); @Override public void onArmorTick(final ItemStack stack, final Level world, final Player player) { if(!enablePerks) return; ItemStack head = player.getItemBySlot(EquipmentSlot.HEAD); ItemStack chest = player.getItemBySlot(EquipmentSlot.CHEST); ItemStack legs = player.getItemBySlot(EquipmentSlot.LEGS); ItemStack feet = player.getItemBySlot(EquipmentSlot.FEET); //Full Set if(head.getItem() == ItemInit.GOBBER2_HELMET_NETHER.get() && chest.getItem() == ItemInit.GOBBER2_CHESTPLATE_NETHER.get() && legs.getItem() == ItemInit.GOBBER2_LEGGINGS_NETHER.get() && feet.getItem() == ItemInit.GOBBER2_BOOTS_NETHER.get()) { if(player.getEffect(MobEffects.POISON) != null) { player.removeEffect(MobEffects.POISON); } if(player.getEffect(MobEffects.WITHER) != null) { player.removeEffect(MobEffects.WITHER); } } //Check ArmorUtil for additional perks applied to armor //Helmet if(head.getItem() == ItemInit.GOBBER2_HELMET_NETHER.get()) { PlayerSpecialAbilities.giveYellowHearts(world, player, stack, 4, 0.33F); PlayerSpecialAbilities.giveRegenEffect(world, player, stack, hunger, (float) saturation); } //Chestplate if(chest.getItem() == ItemInit.GOBBER2_CHESTPLATE_NETHER.get()) { // TBD } //Leggings if(legs.getItem() == ItemInit.GOBBER2_LEGGINGS_NETHER.get()) { } else { } //Boots if(feet.getItem() == ItemInit.GOBBER2_BOOTS_NETHER.get()) { } else { } } @Override public boolean isBookEnchantable(ItemStack stack, ItemStack book) { return true; } @Override public boolean isValidRepairItem(ItemStack toRepair, ItemStack repair) { return repair.getItem() == ItemInit.GOBBER2_INGOT_NETHER.get(); } @OnlyIn(Dist.CLIENT) public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) { super.appendHoverText(stack, worldIn, tooltip, flagIn); if(enablePerks) { tooltip.add((new TranslatableComponent("item.gobber2.gobber2_armor_nether.line2").withStyle(ChatFormatting.LIGHT_PURPLE))); tooltip.add((new TranslatableComponent("item.gobber2.gobber2_armor_nether.line3").withStyle(ChatFormatting.LIGHT_PURPLE))); tooltip.add((new TranslatableComponent("item.gobber2.gobber2_armor_nether.line4").withStyle(ChatFormatting.LIGHT_PURPLE))); tooltip.add((new TranslatableComponent("item.gobber2.gobber2_armor_nether.line5").withStyle(ChatFormatting.LIGHT_PURPLE))); tooltip.add((new TranslatableComponent("item.gobber2.gobber2_armor_nether.line6").withStyle(ChatFormatting.GOLD))); } } @Override public void initializeClient(java.util.function.Consumer<net.minecraftforge.client.IItemRenderProperties> consumer) { consumer.accept(new IItemRenderProperties() { @Override public <A extends HumanoidModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, A _default) { if(armorSlot == EquipmentSlot.CHEST) { return (A) new GobberSamurai(); } return null; } }); } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) { return "gobber2.models.armor.GobberSamurai" + (slot == EquipmentSlot.HEAD ? "2" : "1") + ".png"; } } The problem is in getArmorModel method and in return (A) new GobberSamurai(); It says "The constructor GobberSamurai() is undefined".  Here is my model class:   package com.kwpugh.gobber2.items.armor.models; import java.util.List; import javax.annotation.Nullable; import com.kwpugh.gobber2.config.GobberConfigBuilder; import com.kwpugh.gobber2.init.ItemInit; import com.kwpugh.gobber2.util.PlayerSpecialAbilities; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ArmorMaterial; import net.minecraft.world.item.ItemStack; import net.minecraft.world.effect.MobEffects; import net.minecraft.network.chat.Component; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeDeformation; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.world.item.Item.Properties; public class GobberSamurai<T extends Entity> extends EntityModel<T> { // This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", "gobbersamurai"), "main"); private final ModelPart Head; private final ModelPart Body; private final ModelPart RightArm; private final ModelPart LeftArm; private final ModelPart RightLeg; private final ModelPart LeftLeg; public GobberSamurai(ModelPart root) { this.Head = root.getChild("Head"); this.Body = root.getChild("Body"); this.RightArm = root.getChild("RightArm"); this.LeftArm = root.getChild("LeftArm"); this.RightLeg = root.getChild("RightLeg"); this.LeftLeg = root.getChild("LeftLeg"); } public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); PartDefinition Head = partdefinition.addOrReplaceChild("Head", CubeListBuilder.create().texOffs(1, 34).addBox(-5.0F, -9.0F, -5.0F, 10.0F, 4.0F, 10.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 0.0F)); PartDefinition cube_r1 = Head.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(1, 34).addBox(-3.2F, -0.225F, -5.0F, 5.0F, 1.0F, 10.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(5.8435F, -2.8805F, 0.0F, 0.0F, 0.0F, 1.1345F)); PartDefinition cube_r2 = Head.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(1, 34).addBox(-3.225F, -6.625F, -5.0F, 5.0F, 1.0F, 10.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -0.1594F, 0.0523F, -1.5708F, -0.4363F, 1.5708F)); PartDefinition cube_r3 = Head.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(1, 34).addBox(-6.0F, 5.0F, -5.0F, 1.0F, 2.0F, 10.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, -1.5708F, 0.0F, 1.5708F)); PartDefinition cube_r4 = Head.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(42, 36).addBox(-1.2F, -0.5F, -1.5F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-6.3F, -4.3F, -5.6F, -2.313F, 0.0322F, 2.0649F)); PartDefinition cube_r5 = Head.addOrReplaceChild("cube_r5", CubeListBuilder.create().texOffs(1, 34).mirror().addBox(-1.8F, -0.225F, -5.0F, 5.0F, 1.0F, 10.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(-5.8435F, -2.8805F, 0.0F, 0.0F, 0.0F, -1.1345F)); PartDefinition cube_r6 = Head.addOrReplaceChild("cube_r6", CubeListBuilder.create().texOffs(42, 36).mirror().addBox(-1.8F, -0.5F, -1.5F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(6.3F, -4.3F, -5.6F, -2.313F, -0.0322F, -2.0649F)); PartDefinition Body = partdefinition.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(11, 35).addBox(4.0F, 3.0F, -3.0F, 1.0F, 3.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(-5.0F, 8.0F, -3.0F, 1.0F, 3.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(4.0F, 8.0F, -3.0F, 1.0F, 3.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(-5.0F, 3.0F, -3.0F, 1.0F, 3.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(-4.0F, 1.0F, -4.0F, 8.0F, 7.0F, 2.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(-4.0F, 8.0F, -3.0F, 8.0F, 3.0F, 1.0F, new CubeDeformation(0.0F)) .texOffs(11, 35).addBox(-4.0F, 11.0F, -2.5F, 8.0F, 1.0F, 1.0F, new CubeDeformation(0.0F)) .texOffs(0, 32).addBox(-4.0F, 1.0F, 2.0F, 8.0F, 11.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 0.0F)); PartDefinition RightArm = partdefinition.addOrReplaceChild("RightArm", CubeListBuilder.create().texOffs(39, 2).addBox(-3.5F, -2.5F, -2.5F, 5.0F, 5.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(39, 2).mirror().addBox(-1.5F, 3.5F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(39, 2).mirror().addBox(-3.5F, 3.5F, -2.5F, 2.0F, 6.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(39, 2).mirror().addBox(-1.5F, 6.5F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(-5.0F, 2.0F, 0.0F)); PartDefinition cube_r7 = RightArm.addOrReplaceChild("cube_r7", CubeListBuilder.create().texOffs(10, 37).mirror().addBox(1.5F, -1.0F, -3.5F, 1.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-2.5F, 0.0F, -3.5F, 5.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-4.5F, 1.0F, -3.5F, 3.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-6.5F, 1.5F, -3.5F, 3.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(-4.0588F, -1.8378F, 0.0F, 0.0F, 0.0F, -1.1345F)); PartDefinition LeftArm = partdefinition.addOrReplaceChild("LeftArm", CubeListBuilder.create().texOffs(39, 2).addBox(-1.5F, -2.5F, -2.5F, 5.0F, 5.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(39, 2).addBox(1.5F, 3.5F, -2.5F, 2.0F, 6.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(39, 2).addBox(-1.5F, 3.5F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(39, 2).addBox(-1.5F, 6.5F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offset(5.0F, 2.0F, 0.0F)); PartDefinition cube_r8 = LeftArm.addOrReplaceChild("cube_r8", CubeListBuilder.create().texOffs(10, 37).addBox(3.5F, 1.5F, -3.5F, 3.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(1.5F, 1.0F, -3.5F, 3.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-2.5F, -1.0F, -3.5F, 1.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-2.5F, 0.0F, -3.5F, 5.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(4.0588F, -1.8378F, 0.0F, 0.0F, 0.0F, 1.1345F)); PartDefinition RightLeg = partdefinition.addOrReplaceChild("RightLeg", CubeListBuilder.create(), PartPose.offset(-1.9F, 12.0F, 0.0F)); PartDefinition cube_r9 = RightLeg.addOrReplaceChild("cube_r9", CubeListBuilder.create().texOffs(10, 37).mirror().addBox(-4.9F, 10.65F, 9.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-4.9F, 11.65F, 11.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-4.9F, 9.65F, 7.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(1.9F, -11.8378F, 9.0588F, -1.1345F, 0.0F, 0.0F)); PartDefinition cube_r10 = RightLeg.addOrReplaceChild("cube_r10", CubeListBuilder.create().texOffs(10, 37).mirror().addBox(-4.9F, 10.65F, -12.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-4.9F, 11.65F, -14.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-2.9F, 10.65F, -15.3F, 3.0F, 1.0F, 6.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-2.9F, 11.65F, -17.3F, 3.0F, 1.0F, 6.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-2.9F, 9.65F, -12.3F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-4.9F, 9.65F, -10.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(1.9F, -11.8378F, -9.0588F, 1.1345F, 0.0F, 0.0F)); PartDefinition cube_r11 = RightLeg.addOrReplaceChild("cube_r11", CubeListBuilder.create().texOffs(10, 37).mirror().addBox(-16.0F, 11.0F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-14.0F, 10.0F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false) .texOffs(10, 37).mirror().addBox(-12.0F, 9.0F, -2.5F, 4.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(-7.1588F, -11.8378F, 0.0F, 0.0F, 0.0F, -1.1345F)); PartDefinition LeftLeg = partdefinition.addOrReplaceChild("LeftLeg", CubeListBuilder.create(), PartPose.offset(1.9F, 12.0F, 0.0F)); PartDefinition cube_r12 = LeftLeg.addOrReplaceChild("cube_r12", CubeListBuilder.create().texOffs(10, 37).addBox(13.0F, 11.0F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(11.0F, 10.0F, -2.5F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(8.0F, 9.0F, -2.5F, 4.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(7.1588F, -11.8378F, 0.0F, 0.0F, 0.0F, 1.1345F)); PartDefinition cube_r13 = LeftLeg.addOrReplaceChild("cube_r13", CubeListBuilder.create().texOffs(10, 37).addBox(-0.1F, 9.65F, -12.3F, 3.0F, 1.0F, 5.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(2.9F, 11.65F, -14.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-0.1F, 11.65F, -17.3F, 3.0F, 1.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(2.9F, 10.65F, -12.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-0.1F, 10.65F, -15.3F, 3.0F, 1.0F, 6.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(2.9F, 9.65F, -10.3F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.9F, -11.8378F, -9.0588F, 1.1345F, 0.0F, 0.0F)); PartDefinition cube_r14 = LeftLeg.addOrReplaceChild("cube_r14", CubeListBuilder.create().texOffs(10, 37).addBox(-0.1F, 9.65F, 7.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-0.1F, 11.65F, 11.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)) .texOffs(10, 37).addBox(-0.1F, 10.65F, 9.5F, 5.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.9F, -11.8378F, 9.0588F, -1.1345F, 0.0F, 0.0F)); return LayerDefinition.create(meshdefinition, 64, 64); } @Override public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { } @Override public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { Head.render(poseStack, buffer, packedLight, packedOverlay); Body.render(poseStack, buffer, packedLight, packedOverlay); RightArm.render(poseStack, buffer, packedLight, packedOverlay); LeftArm.render(poseStack, buffer, packedLight, packedOverlay); RightLeg.render(poseStack, buffer, packedLight, packedOverlay); LeftLeg.render(poseStack, buffer, packedLight, packedOverlay); } } I just don't know what to do now, I have searched everywhere but I have found nothing for 1.18.1 version.
    • I've been trying for the past hour to get one of these Modpacks to work, and after running the Serverrun.bat it gets all the way through the process on both Modpacks before it gives me the following Error Message. Error: Could not find or load main class @libraries.net.minecraftforge.forge.1.18.1-39.0.22.win_args.txt Any help would be great!  
    • The game crashed while playing. please help I don't know how to. ---- Minecraft Crash Report ---- // Shall we play a game? Time: 1/29/22, 1:08 AM Description: Exception in server tick loop java.lang.NoSuchMethodError: 'net.minecraft.nbt.CompoundTag net.minecraft.world.level.block.entity.BlockEntity.save(net.minecraft.nbt.CompoundTag)'     at ht.treechop.common.block.ChoppedLogBlock$Entity.save(ChoppedLogBlock.java:291) ~[TreeChop-Mod-1.18.1.jar%2367!/:0.15.3] {re:classloading}     at ht.treechop.common.block.ChoppedLogBlock$Entity.m_5995_(ChoppedLogBlock.java:335) ~[TreeChop-Mod-1.18.1.jar%2367!/:0.15.3] {re:classloading}     at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_195642_(ClientboundBlockEntityDataPacket.java:21) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.m_195640_(ClientboundBlockEntityDataPacket.java:25) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at ht.treechop.common.block.ChoppedLogBlock$Entity.getUpdatePacket(ChoppedLogBlock.java:328) ~[TreeChop-Mod-1.18.1.jar%2367!/:0.15.3] {re:classloading}     at ht.treechop.common.block.ChoppedLogBlock$Entity.m_183216_(ChoppedLogBlock.java:260) ~[TreeChop-Mod-1.18.1.jar%2367!/:0.15.3] {re:classloading}     at net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(ForgeHooks.java:562) ~[forge-1.18.1-39.0.62-universal.jar%2374!/:?] {re:classloading}     at net.minecraft.server.level.ServerPlayerGameMode.m_9280_(ServerPlayerGameMode.java:227) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:computing_frames,re:classloading}     at net.minecraft.server.level.ServerPlayerGameMode.m_9286_(ServerPlayerGameMode.java:217) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:computing_frames,re:classloading}     at net.minecraft.server.level.ServerPlayerGameMode.m_7391_(ServerPlayerGameMode.java:187) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:computing_frames,re:classloading}     at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7502_(ServerGamePacketListenerImpl.java:945) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.m_5797_(ServerboundPlayerActionPacket.java:34) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.m_5797_(ServerboundPlayerActionPacket.java:8) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:21) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:classloading}     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:151) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,re:computing_frames,re:classloading}     at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:765) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:125) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:748) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:742) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:110) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:727) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:672) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.18.1-20211210.034407-srg.jar%2370!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}     at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.18.1     Minecraft Version ID: 1.18.1     Operating System: Windows 10 (amd64) version 10.0     Java Version: 17.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 2163132464 bytes (2062 MiB) / 6643777536 bytes (6336 MiB) up to 8589934592 bytes (8192 MiB)     CPUs: 8     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz     Identifier: Intel64 Family 6 Model 142 Stepping 11     Microarchitecture: whiskey Lake     Frequency (GHz): 1.99     Number of physical packages: 1     Number of physical CPUs: 4     Number of logical CPUs: 8     Graphics card #0 name: Intel(R) UHD Graphics 620     Graphics card #0 vendor: Intel Corporation (0x8086)     Graphics card #0 VRAM (MB): 1024.00     Graphics card #0 deviceId: 0x3ea0     Graphics card #0 versionInfo: DriverVersion=26.20.100.7926     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 2.40     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 8192.00     Memory slot #1 clockSpeed (GHz): 2.40     Memory slot #1 type: DDR4     Virtual memory max (MB): 20670.30     Virtual memory used (MB): 17701.50     Swap memory total (MB): 4496.57     Swap memory used (MB): 717.27     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Server Running: true     Player Count: 1 / 8; [ServerPlayer['rocio12barcenas'/187, l='ServerLevel[New World]', x=82.38, y=75.00, z=-249.35]]     Data Packs: vanilla, mod:forge, mod:sereneseasons (incompatible), mod:mna (incompatible), mod:treechop (incompatible), mod:terrablender, mod:apotheosis (incompatible), mod:cfm, mod:jei, mod:bumblecore, mod:byg (incompatible), mod:torohealth (incompatible), mod:curios, mod:xaerominimap, mod:geckolib3 (incompatible), mod:xaeroworldmap, mod:placebo (incompatible), mod:dramaticdoors, mod:travelersbackpack, mod:foodsicles     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'; Server brand changed to 'forge'     ModLauncher: 9.1.0+9.1.0+main.6690ee51     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:           mixin PLUGINSERVICE           eventbus PLUGINSERVICE           object_holder_definalize PLUGINSERVICE           runtime_enum_extender PLUGINSERVICE           capability_token_subclass PLUGINSERVICE           accesstransformer PLUGINSERVICE           runtimedistcleaner PLUGINSERVICE           mixin TRANSFORMATIONSERVICE           fml TRANSFORMATIONSERVICE      FML Language Providers:          minecraft@1.0         javafml@null     Mod List:          client-1.18.1-20211210.034407-srg.jar             |Minecraft                     |minecraft                     |1.18.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         Serene-Seasons-Mod-1.18.1.jar                     |Serene Seasons                |sereneseasons                 |1.18.1-6.0.0.11     |DONE      |Manifest: NOSIGNATURE         Mana-and-Artifice-Mod-1.18.1.jar                  |Mana and Artifice             |mna                           |1.7.0.2             |DONE      |Manifest: NOSIGNATURE         TreeChop-Mod-1.18.1.jar                           |HT's TreeChop                 |treechop                      |0.15.3              |DONE      |Manifest: NOSIGNATURE         TerraBlender-forge-1.18.1-1.1.0.73.jar            |TerraBlender                  |terrablender                  |1.18.1-1.1.0.73     |DONE      |Manifest: NOSIGNATURE         Apotheosis-Mod-1.18.1.jar                         |Apotheosis                    |apotheosis                    |5.2.0               |DONE      |Manifest: NOSIGNATURE         MrCrayfishs-Furniture-Mod-1.18.1.jar              |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre28         |DONE      |Manifest: NOSIGNATURE         jei-1.18.1-9.2.3.82.jar                           |Just Enough Items             |jei                           |9.2.3.82            |DONE      |Manifest: NOSIGNATURE         bumblecore-1.18.1-1.0.4.jar                       |Bumblecore                    |bumblecore                    |1.18.1-1.0.4        |DONE      |Manifest: NOSIGNATURE         Oh+The+Biomes+You'll+Go-forge-1.18.1-1.3.5.8.jar  |Oh The Biomes You'll Go       |byg                           |1.3.5.8             |DONE      |Manifest: NOSIGNATURE         forge-1.18.1-39.0.62-universal.jar                |Forge                         |forge                         |39.0.62             |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90         torohealth-1.18-forge-2.jar                       |ToroHealth                    |torohealth                    |1.18-forge-2        |DONE      |Manifest: NOSIGNATURE         Curios-API-1.18.1.jar                             |Curios API                    |curios                        |1.18.1-5.0.6.0      |DONE      |Manifest: NOSIGNATURE         Xaeros_Minimap_22.1.0_Forge_1.18.jar              |Xaero's Minimap               |xaerominimap                  |22.1.0              |DONE      |Manifest: NOSIGNATURE         geckolib-1.18-forge-3.0.9.jar                     |GeckoLib                      |geckolib3                     |3.0.9               |DONE      |Manifest: NOSIGNATURE         XaerosWorldMap_1.20.0_Forge_1.18.jar              |Xaero's World Map             |xaeroworldmap                 |1.20.0              |DONE      |Manifest: NOSIGNATURE         Place2bo-1.18.1-6.0.5.jar                          |Placebo                       |placebo                       |6.0.5               |DONE      |Manifest: NOSIGNATURE         Dramatic-Doors-Mod-1.18.1.jar                     |Dramatic Doors                |dramaticdoors                 |1.18.1-1.5.0        |DONE      |Manifest: NOSIGNATURE         TravelersBackpack-1.18.1-7.0.1.jar                |Traveler's Backpack           |travelersbackpack             |7.0.1               |DONE      |Manifest: NOSIGNATURE         foodsicles-1.18.1-1.0.4.jar                       |Foodsicles                    |foodsicles                    |1.18.1-1.0.4        |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: d060c158-744d-48bd-ba52-bf8d49f5f8d2     FML: 39.0     Forge: net.minecraftforge:39.0.6
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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