Cuberite Forum
When placing furnaces with World:SetBlock they become invisible - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: When placing furnaces with World:SetBlock they become invisible (/thread-3193.html)



When placing furnaces with World:SetBlock they become invisible - MGlolenstine - 08-02-2018

When I use SetBlock with furnaces, the furnaces become invisible and to destroy them, you have to place block in the same spot and then break it.

Code:
World:SetBlock(v.cleanpos.x, v.cleanpos.y, v.cleanpos.z, E_BLOCK_FURNACE, 0, true)

The block should be synced with the player, as the last argument is set to true.


RE: When placing furnaces with World:SetBlock they become invisible - tigerw - 08-03-2018

Might be a block entities issue? Does this happen with e.g. chests, command blocks, signs, mob spawners?

By invisible, do you mean the hitbox is still there but the textures aren't rendered, or it just disappears allowing you to put another block there? If you can put another block in the furnace's place, does the furnace only reappear when you break the block, or does it reappear automatically?


RE: When placing furnaces with World:SetBlock they become invisible - MGlolenstine - 08-03-2018

(08-03-2018, 01:48 AM)tigerw Wrote: Might be a block entities issue? Does this happen with e.g. chests, command blocks, signs, mob spawners?

By invisible, do you mean the hitbox is still there but the textures aren't rendered, or it just disappears allowing you to put another block there? If you can put another block in the furnace's place, does the furnace only reappear when you break the block, or does it reappear automatically?

The furnace isn't there at all, there is no hitbox, no texture, and you can place the block in the same place, but if you right-click on the block in the place of the Furnace(wool for example), it opens up a furnace gui and if you break the block after, the "furnace" dissapears. Furthermore, the furnace is detected by the World:ForEachFurnaceInChunk.

thanks for your help


RE: When placing furnaces with World:SetBlock they become invisible - tigerw - 08-03-2018

Huh, well I guess the server knows it's there, but not the client. Thanks Mojang.


RE: When placing furnaces with World:SetBlock they become invisible - xoft - 08-07-2018

If you load the invisible furnace so that it should light up, does the client finally display it, or is it still invisible?

There are basically two main reasons for this behavior - either we're sending a bad block metadata and the client doesn't know how to display such a furnace (seen it already before), or the client needs some more data to be sent for the furnace to show up (the block entity) and we're not sending that. The above test should discriminate between the two, since it causes some metadata twiddling.

Is furnace the only affected block, or are there any other block entities that behave this funny ? Chests, enderchests, pistons, ...