Jump to content

Mysterious disappearing blocks


tlr38usd

Recommended Posts

I'm having trouble with my custom blocks. I place them in the world and then I quit the game and when I reopen the game they're gone! I've narrowed the problem down to my blocks tile entity, it seems when I comment out the nbt write / read functions it works fine. I'm not sure what the problem is

 

Here's my nbt code

public void writeToNBT(NBTTagCompound nbt) {
	super.writeToNBT(nbt);

	nbt.setIntArray("group", this.group);
	nbt.setInteger("speed", this.speed);
	nbt.setInteger("ticksTillCheck", this.ticksTillCheck);
}

public void readFromNBT(NBTTagCompound nbt) {
	super.readFromNBT(nbt);

	this.group = nbt.getIntArray("group");
	this.speed = nbt.getInteger("speed");
	this.ticksTillCheck = nbt.getInteger("ticksTillCheck");
}

Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Announcements



×
×
  • Create New...

Important Information

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