Jump to content

BlockEntity redraw only happens after a player interaction update


Recommended Posts

Hi 

I am making a drying mat for my mod and I think I have found an issue with the base API where when an item transforms inside of a BlockEntityDisplay the item displayed will only update if a player interaction update happens. I have tested this will the default shelf also and it is the same where the bread has rotted by it is still displaying bread. I have tried calling make dirty on both the slot inside of the OnTransitionNow and on a repeating method inside the block entity but no change. I had a quick look in the currents bugs and couldn't see this listed so want to check with other modders before submitting it as a bug. 

Anyone else seen this issue. 

Link to comment
Share on other sites

Yeah I've seen exactly that.  A lot of my contraptions are based on the Display Case/Shelf code, and broke with the 1.14.8 release.  I believe I fixed it by adding this to my BlockEntities.
 

public override void FromTreeAttributes(ITreeAttribute tree, IWorldAccessor worldForResolve)
{
	base.FromTreeAttributes(tree, worldForResolve);
	if (Api != null)
	{
		if (Api.Side == EnumAppSide.Client)
		{ Api.World.BlockAccessor.MarkBlockDirty(Pos); }
	}
}

 

 
Edited by Spear and Fang
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.