Jump to content

[1.19] [SOLVED] Render mini entites inside block entites like spawner


Recommended Posts

Posted (edited)

I have a block entity and a block entity renderer class. I want to render an entity inside block and I am kinda able to do that. When I first placed the block everything works fine. But when I save & load back the world entity is gone. How I can save the entity on server-side or render entity without spawning it. I need some answers how I can do that?

Block Entity Class

  Reveal hidden contents

Base Block Class

  Reveal hidden contents

Renderer Class

  Reveal hidden contents

 

Edited by FantaLaTone
solved
Posted

You don't want to store data in your Block like that. The whole point of the BlockEntity is to store data.

What you are missing is networking code to send the server's block entity state to the client. e.g. when the game reloads the data

https://forge.gemwire.uk/wiki/Block_Entities

https://forums.minecraftforge.net/topic/115679-1182-block-entity-renderer-disappears-after-leaving-the-world/#comment-511734

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

  • 3 weeks later...
  • FantaLaTone changed the title to [1.19] [SOLVED] Render mini entites inside block entites like spawner

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.