Jump to content

Recommended Posts

Posted

Am I doing something wrong here, or do I actually have to make an update packet just to send in the onLoad()?

TileEntity class is here

My exact problem is that I have a TESR which can hold one ItemStack, and renders that stack above itself. When loading into the world, nothing renders until I take out and put the item back in, since my right click method is called on both sides. Is there some simple way to sync them or do I have to make a sync packet myself?

Posted
4 minutes ago, TheUnderTaker11 said:

My exact problem is that I have a TESR which can hold one ItemStack, and renders that stack above itself.

.You should instead use a custom IBakedModel and add the quads of the Item to the Blocks model.

5 minutes ago, TheUnderTaker11 said:

Is there some simple way to sync them or do I have to make a sync packet myself?

Override TileEntity#getUpdatePacket/getUpdateTag/onDataPacket/handleUpdateTag

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)

It also rotates, forgot to say that, so unless it can rotate the way you said.

 

Also the getUpdateTag is the one thing I was missing, thanks. Had no need to do onDataPacket or handleUpdateTag though.

Edited by TheUnderTaker11
Posted
6 hours ago, Animefan8888 said:

.You should instead use a custom IBakedModel and add the quads of the Item to the Blocks model.

Some(for example beds and shields) items in the game are rendered via a TileEntityItemStackRenderer. Those can't be rendered through a IBakedModel since they don't have one themselves. It also won't work with modded items which use TEISR.

Posted
7 hours ago, V0idWa1k3r said:

Some(for example beds and shields) items in the game are rendered via a TileEntityItemStackRenderer. Those can't be rendered through a IBakedModel since they don't have one themselves. It also won't work with modded items which use TEISR.

I'm not sure if TEISRs are given GL access, but the  it could be done using a combination of the two. If you use a TESR that doesnt do anything but a single conditional check every frame except for when the Item uses a TEISR it should be a better performing render. The reason I brought up GL access is TESRFast would obviously be the better method instead of just a TESR.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.