Fix block type check on placement
This commit is contained in:
parent
aea3ef3623
commit
78ee3b3bcd
1 changed files with 1 additions and 2 deletions
|
@ -49,8 +49,7 @@ namespace TechbloxModdingAPI.Blocks
|
||||||
{
|
{
|
||||||
if (_blockEntityFactory == null)
|
if (_blockEntityFactory == null)
|
||||||
throw new BlockException("The factory is null.");
|
throw new BlockException("The factory is null.");
|
||||||
uint resourceId = (uint) PrefabsID.GenerateResourceID(0, block);
|
if(!FullGameFields._dataDb.ContainsKey<CubeListData>(block))
|
||||||
if (!PrefabsID.PrefabIDByResourceIDMap.ContainsKey(resourceId))
|
|
||||||
throw new BlockException("Block with ID " + block + " not found!");
|
throw new BlockException("Block with ID " + block + " not found!");
|
||||||
//RobocraftX.CR.MachineEditing.PlaceSingleBlockEngine
|
//RobocraftX.CR.MachineEditing.PlaceSingleBlockEngine
|
||||||
DBEntityStruct dbEntity = new DBEntityStruct {DBID = block};
|
DBEntityStruct dbEntity = new DBEntityStruct {DBID = block};
|
||||||
|
|
Loading…
Reference in a new issue