Fix Block type exception on unsynced Specialize<T>()
This commit is contained in:
parent
5660bfc28d
commit
6a137472c1
1 changed files with 10 additions and 0 deletions
|
@ -104,11 +104,21 @@ namespace GamecraftModdingAPI.Blocks
|
|||
|
||||
public bool BlockExists(EGID id)
|
||||
{
|
||||
if (!Synced)
|
||||
{
|
||||
Sync();
|
||||
Synced = true;
|
||||
}
|
||||
return entitiesDB.Exists<DBEntityStruct>(id);
|
||||
}
|
||||
|
||||
public bool GetBlockInfoExists<T>(EGID blockID) where T : struct, IEntityComponent
|
||||
{
|
||||
if (!Synced)
|
||||
{
|
||||
Sync();
|
||||
Synced = true;
|
||||
}
|
||||
return entitiesDB.Exists<T>(blockID);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue