Browse Source

Fix block type check on placement

tags/v2.0.0
NorbiPeti 3 years ago
parent
commit
78ee3b3bcd
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      TechbloxModdingAPI/Blocks/PlacementEngine.cs

+ 1
- 2
TechbloxModdingAPI/Blocks/PlacementEngine.cs View File

@@ -49,8 +49,7 @@ namespace TechbloxModdingAPI.Blocks
{
if (_blockEntityFactory == null)
throw new BlockException("The factory is null.");
uint resourceId = (uint) PrefabsID.GenerateResourceID(0, block);
if (!PrefabsID.PrefabIDByResourceIDMap.ContainsKey(resourceId))
if(!FullGameFields._dataDb.ContainsKey<CubeListData>(block))
throw new BlockException("Block with ID " + block + " not found!");
//RobocraftX.CR.MachineEditing.PlaceSingleBlockEngine
DBEntityStruct dbEntity = new DBEntityStruct {DBID = block};


Loading…
Cancel
Save