示例#1
0
 private static bool AddEntity(TileEntityBase tileEntity, int entityID)
 {
     if (registeredEntities.ContainsKey(entityID))
     {
         return(false);
     }
     registeredEntities.Add(entityID, tileEntity);
     return(true);
 }
示例#2
0
        public static void SetTileEntity(int x, int y, TileEntityBase tileEntity)
        {
            //exit setting code if the tile entity or tile entity id was not specified
            if (tileEntity == null)
            {
                return;
            }
            string tileEntityGridID = GetTileEntityID(x, y);

            DeleteTile(x, y);

            SetTileEntity(x, y, tileEntity.entityID);
        }