Wakaba2 / World-Renderer

This plugin allows you to render objects to the sky and world
MIT License
0 stars 0 forks source link

Crash when trying to render item #3

Open Dente222 opened 6 months ago

Dente222 commented 6 months ago

Soo when i try to render item above my block, game crashes and cant really do anything about that Rendering item at players location is fine but at block it has some issue with it :L

Picture of my procedure where it should render item when machine is active image

Picture of procedure where block saves its location as NBT when placed image

Here is link to Crash when trying to open world while game still tries to render item "Console Log" https://pastebin.com/T9fRw20r

This one is from when I try to render item while my block works "Console Log" https://pastebin.com/ufJknz3n

Crashlog from When I try to render Item crash-2024-05-07_15.26.07-server.txt Another Log crash-2024-05-07_14.48.35-client.txt

Wakaba2 commented 6 months ago

Could you show me the collapsed procedure and "Pull Energy"?

Dente222 commented 6 months ago

Pull energy basically checks if there is block next to this block that contains NBT Tag And collapsed procedures basically changes 1 NBT tag to true and changes block state All of that was pre made before this issue occured

Dente222 commented 6 months ago

But if you still need this then I will send you full procedure file to check later

Wakaba2 commented 6 months ago

You should not call a procedure from a block tick event. Moreover, it is not possible to set block NBT on client side.

Wakaba2 commented 6 months ago

You will need to scan surrounding blocks and render items. render_items

Dente222 commented 6 months ago

I'm trying to render item from slot 0 of a block

Manyaarvadiya commented 6 months ago

Possible but requires 2 procedures

Manyaarvadiya commented 6 months ago

On world tick. Save block in a global var

Manyaarvadiya commented 6 months ago

On graphic render model. Render block as the var

Dente222 commented 6 months ago

Do I need to save it on world tick? Can't I just use get itemstac of slot 0?

Manyaarvadiya commented 6 months ago

World ticks are better as they called so many times

Dente222 commented 6 months ago

Do I need to save Block XYZ in Global Variable?

Manyaarvadiya commented 6 months ago

No

Dente222 commented 6 months ago

How can I do it then???

Dente222 commented 6 months ago

BTW Game also crashes when you try to render Item even above players location crash-2024-05-12_15.58.24-client.txt

Noticed that the problem here is that is it always renders at entity...

Wakaba2 commented 6 months ago

Could you send me the procedure?

Dente222 commented 6 months ago

Could you send me the procedure?

Which one exactly you are asking for?

Dente222 commented 6 months ago

I have honestly give up on that... Ive tried to make it work with NBT's, Global Variable and Local variables All of them ends the same way... render item on player Or crash after 1min

I have actually managed to Render Item in it but it only appeared when I went inside block....

Dente222 commented 6 months ago

Anyway This is my procedure and it runs on when item in GUI slot changes image

Also Ive noticed buch of things Game works fine when I use NBT and set it on a Item Slot change in GUI However game does not render that Item unless I get inside this block also game Crashes when I try to render Item directly from item slot and not a predefined Item which makes it pointless... so yeah Using "get item from Itemslot of a tileentity" crashes whenever game triggers that procedure again for some reason which happens when item is removed from my slot by my machine but it does nothing if I set item manualy in procedure....

Crashlog: crash-2024-05-14_02.53.42-client.txt

Also thats what I mean when I say that it only renders when Im inside my block https://i.imgur.com/qrWdGcV.gif

Wakaba2 commented 6 months ago

Dependencies "x/y/z" are a player position. You should use global variables instead of block NBT

Dente222 commented 6 months ago

Dependencies "x/y/z" are a player position. You should use global variables instead of block NBT

Apparently it still works with nbts it just doesn't render if you aren't close enough

But let's be honest if I use global variables, how I can render multiple different item on multiple different blocks??? Also why is it has to be soo over complicated??

Wakaba2 commented 6 months ago

If there are multiple positions, need other plugins like Array Lists.

Dente222 commented 6 months ago

I stick with my question: Why it has to be overcomplicated? Why it cant be basic like "Render item from block inventory"???

Wakaba2 commented 6 months ago

Because it is not possible to change block rendering directly.

Dente222 commented 6 months ago

Who talks about changing Block rendering? All I want is to get the coordination of my block and use them to render item at that location... If I would want to change anything about my block, I would use Blockstate

Manyaarvadiya commented 6 months ago

Dude tryout different things. A new version has came out of world rendere

Dente222 commented 6 months ago

Currently Problem I have is that to see the rendered item, I need to be inside the block

Wakaba2 commented 6 months ago

World Renderer 1.6.0 or above allow you to iterate block entities using a procedure "Iterator - Iterate block entities." It may solve the problem.