[Solved] Set Block, BlockContainer

I use PUBGMC mod and I use Sponge for server side.
How I can set block from mod to the world?

Vector3i pos;
Sponge.getServer().getWorld("world").get().setBlockType(pos,?);

Exists method like

ItemType.fromBlockID( string id)

?

Try this.

Sponge.getRegistery().getType(ItemType.class, "id of item");

Also note that you have requested an item type. Yet to modify the world, you need a blocktype

2 Likes

Sponge.getRegistry().getType(BlockType.class, "theblockid")

2 Likes