CustomiesDevs/Customies

Broken block registration

Closed this issue · 3 comments

Problems occur when registering a block. The block is not added to the creative, if I put it through setBlock(), then I can take it with the mouse wheel, the client sees it as an empty slot

`

registerBlocks(); } private function registerBlocks(): void { $model_id = "geometry.block"; $material = new Material(Material::TARGET_ALL, "blackstone", Material::RENDER_METHOD_BLEND); $model = new Model([$material], $model_id, new Vector3(-8, 0, -8), new Vector3(16, 16, 16)); $id = "minecraft:tuff"; $creativeInfo = new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_NATURE); CustomiesBlockFactory::getInstance()->registerBlock(fn(int $id) => new Tuff(new BlockIdentifier($id, 0), "Туфф", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel())), $id, null, $creativeInfo); $id = "minecraft:cobbled_deepslate"; $creativeInfo = new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_NATURE); CustomiesBlockFactory::getInstance()->registerBlock(fn(int $id) => new CobbledDeepslate(new BlockIdentifier($id, 0), "Глубинный сланец", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel())), $id, null, $creativeInfo); $id = "minecraft:calcite"; $creativeInfo = new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_NATURE); CustomiesBlockFactory::getInstance()->registerBlock(fn(int $id) => new Calcite(new BlockIdentifier($id, 0), "Кальцит", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel())), $id, null, $creativeInfo); } } `

Delete your idcache into your customies plugin_data

Delete your idcache into your customies plugin_data

It helped, what is the essence of the problem?

Delete your idcache into your customies plugin_data

It helped, what is the essence of the problem?

I am not yet aware of what causes the cache to corrupt blocks like this, but since your issue is now resolved I will close this issue.